Skip to content

Commit ca30dec

Browse files
committed
fix using global hash to deploy contract
1 parent 32248a4 commit ca30dec

File tree

2 files changed

+2
-1
lines changed

2 files changed

+2
-1
lines changed

Cargo.toml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@ crate-type = ["cdylib", "rlib"]
88

99
[dependencies]
1010
borsh = "1.5.7"
11+
bs58 = "0.5.1"
1112
near-sdk = { version = "5.17.1", features = ["global-contracts", "unstable"] }
1213

1314
[dev-dependencies]

src/lib.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -76,7 +76,7 @@ impl GlobalFactoryContract {
7676
"Using global contract with code hash: {:?}",
7777
code_hash
7878
));
79-
promise.use_global_contract(code_hash.as_bytes().to_vec())
79+
promise.use_global_contract(bs58::decode(code_hash).into_vec().unwrap())
8080
}
8181
}
8282
}

0 commit comments

Comments
 (0)