Skip to content

Commit

Permalink
contract: Fix for updated upload_code interface
Browse files Browse the repository at this point in the history
  • Loading branch information
tash-2s committed May 14, 2023
1 parent 7c8e3b2 commit 42451c8
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 2 deletions.
3 changes: 2 additions & 1 deletion contract/deploy/dev/upgradeContract.ts
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,8 @@ const main = async () => {
compactAddLength(
newCode(api, "game", __dirname, "../../game/target/ink/game.contract").code
),
null
null,
"Enforced"
),
keyringPair
)
Expand Down
6 changes: 5 additions & 1 deletion contract/deploy/dev/uploadCode.ts
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,11 @@ const main = async () => {
const api = await connect(endpoint, false)
const code = newCode(api, "game", __dirname, "../../game/target/ink/game.contract")

await tx(api, (t) => t.contracts.uploadCode(compactAddLength(code.code), null), keyringPair)
await tx(
api,
(t) => t.contracts.uploadCode(compactAddLength(code.code), null, "Enforced"),
keyringPair
)
}

main()
Expand Down

0 comments on commit 42451c8

Please sign in to comment.