Skip to content

Commit

Permalink
Merge pull request #121 from invariant-labs/update-sdk-scripts
Browse files Browse the repository at this point in the history
Update sdk scripts
  • Loading branch information
wojciech-cichocki authored Dec 26, 2023
2 parents 41e4cc4 + ebaf4ea commit 448b8b5
Show file tree
Hide file tree
Showing 5 changed files with 11 additions and 8 deletions.
6 changes: 3 additions & 3 deletions sdk/metadata/contract.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"source": {
"hash": "0x89fd1ac0bc66d54b9eaf158fad99af87b490fe71083fd328e0c04e46832752f5",
"hash": "0x777dd7f7ddf3b04b84ec1e0145975604e34e9ea6c506bfb1145282190dcabc37",
"language": "ink! 4.3.0",
"compiler": "rustc 1.72.1",
"build_info": {
Expand Down Expand Up @@ -1926,10 +1926,10 @@
"name": "protocol_fee"
}
],
"name": "State"
"name": "InvariantConfig"
}
},
"name": "state"
"name": "config"
}
],
"name": "Contract"
Expand Down
Binary file modified sdk/metadata/contract.wasm
Binary file not shown.
9 changes: 5 additions & 4 deletions sdk/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,11 +5,12 @@
"type": "module",
"main": "index.js",
"scripts": {
"prebuild": "rm -rf target && cp ../target/ink/contract.wasm ./metadata/ && cp ../target/ink/contract.json ./metadata/",
"prebuild": "npm run contract:build && rm -rf target && cp ../target/ink/contract.wasm ./metadata/ && cp ../target/ink/contract.json ./metadata/",
"build": "npx tsc",
"start-node": "substrate-contracts-node purge-chain -y && substrate-contracts-node --rpc-port 9944 --dev",
"start": "npx tsc && ts-node target/index.js testnet",
"local": "npx tsc && ts-node target/index.js local"
"start:testnet": "npx tsc && ts-node target/index.js testnet",
"start:local": "npx tsc && ts-node target/index.js local",
"node:start": "substrate-contracts-node purge-chain -y && substrate-contracts-node --rpc-port 9944 --dev",
"contract:build": "cd .. && cargo contract build --release && cd sdk"
},
"dependencies": {
"@polkadot/api": "^10.11.2",
Expand Down
1 change: 1 addition & 0 deletions sdk/src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@ const main = async () => {
console.log(newFee);

console.log("Passed.");
process.exit(0);
};

main();
3 changes: 2 additions & 1 deletion tests.sh
Original file line number Diff line number Diff line change
Expand Up @@ -26,4 +26,5 @@ cargo clippy --all-targets -- --no-deps -D warnings
cargo test --features e2e-tests

# build contract
cargo contract build
cargo contract build
cargo cobtract build --release

0 comments on commit 448b8b5

Please sign in to comment.