Skip to content

Commit

Permalink
trim_right() the result of `include_str!("./res/contract_token.code…
Browse files Browse the repository at this point in the history
…")` (#524)

* trim_right the result of `include_str!("./res/contract_token.code")`

* untabify!

* Use "trim_end"

* Update examples/contract.rs

Got turned around. Thanks!

Co-authored-by: Tomasz Drwięga <tomusdrw@users.noreply.github.com>

Co-authored-by: Tomasz Drwięga <tomusdrw@users.noreply.github.com>
  • Loading branch information
stnbu and tomusdrw authored Jul 26, 2021
1 parent 8dda953 commit 5f3f571
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion examples/contract.rs
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ async fn main() -> web3::contract::Result<()> {

let my_account = hex!("d028d24f16a8893bd078259d413372ac01580769").into();
// Get the contract bytecode for instance from Solidity compiler
let bytecode = include_str!("./res/contract_token.code");
let bytecode = include_str!("./res/contract_token.code").trim_end();
// Deploying a contract
let contract = Contract::deploy(web3.eth(), include_bytes!("../src/contract/res/token.json"))?
.confirmations(0)
Expand Down

0 comments on commit 5f3f571

Please sign in to comment.