File tree Expand file tree Collapse file tree 5 files changed +18
-6
lines changed Expand file tree Collapse file tree 5 files changed +18
-6
lines changed Original file line number Diff line number Diff line change 1616 CARGO_TERM_COLOR : always
1717
1818jobs :
19- build :
19+ test :
20+ name : Workspace test
2021 runs-on : ubuntu-latest
2122 defaults :
2223 run :
2526 - uses : actions/checkout@v2
2627 - name : Test
2728 run : ./workspace-test.sh
29+ reproducible-build :
30+ name : Reproducible build
31+ runs-on : ubuntu-latest
32+ defaults :
33+ run :
34+ working-directory : target_chains/near/receiver
35+ steps :
36+ - uses : actions/checkout@v2
37+ - run : sudo apt-get install -y libudev-dev
38+ -
run :
cargo +stable install --locked [email protected] 39+ - run : cargo near build reproducible-wasm
Original file line number Diff line number Diff line change @@ -12,7 +12,7 @@ Deploying the NEAR contract has three steps:
12121 . Create a NEAR key with ` near generate-key `
13132 . Fetch NEAR tokens from an available faucet, at last deploy around 100~ NEAR were needed.
14143 . See the example deploy script in ` scripts/deploy.sh ` to deploy the contract. You can find a codehash by:
15- - ` sha256sum pyth .wasm ` after building the contract.
15+ - ` sha256sum pyth_near .wasm ` after building the contract.
1616 - ` list(bytes.fromhex(hash)) ` in Python to get a byte array.
1717 - Replace the ` codehash ` field in deploy.sh for the initial codehash.
1818 - Replace the sources with the keys expected by the network you're deploying on (testnet vs mainnet).
Original file line number Diff line number Diff line change @@ -27,9 +27,9 @@ async fn initialize_chain() -> (
2727
2828 // Deploy Pyth
2929 let contract = worker
30- . dev_deploy ( & std:: fs:: read ( "pyth .wasm" ) . expect ( "Failed to find pyth .wasm" ) )
30+ . dev_deploy ( & std:: fs:: read ( "pyth_near .wasm" ) . expect ( "Failed to find pyth_near .wasm" ) )
3131 . await
32- . expect ( "Failed to deploy pyth .wasm" ) ;
32+ . expect ( "Failed to deploy pyth_near .wasm" ) ;
3333
3434 // Deploy Wormhole Stub, this is a dummy contract that always verifies VAA's correctly so we
3535 // can test the ext_wormhole API.
Original file line number Diff line number Diff line change @@ -10,7 +10,7 @@ set -euo pipefail
1010rustup target add wasm32-unknown-unknown
1111
1212cargo build --release --target wasm32-unknown-unknown
13- cp target/wasm32-unknown-unknown/release/pyth .wasm .
13+ cp target/wasm32-unknown-unknown/release/pyth_near .wasm .
1414
1515(
1616 cd ../wormhole-stub
Original file line number Diff line number Diff line change @@ -28,6 +28,6 @@ INIT_JSON=$(echo "$INIT_ARGS" | jq -c '.' -M)
2828# Deploy..
2929near deploy \
3030 --accountId " pyth.testnet" \
31- --wasmFile pyth .wasm \
31+ --wasmFile pyth_near .wasm \
3232 --initFunction new \
3333 --initArgs " $INIT_JSON "
You can’t perform that action at this time.
0 commit comments