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 16
16
CARGO_TERM_COLOR : always
17
17
18
18
jobs :
19
- build :
19
+ test :
20
+ name : Workspace test
20
21
runs-on : ubuntu-latest
21
22
defaults :
22
23
run :
25
26
- uses : actions/checkout@v2
26
27
- name : Test
27
28
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 cargo-near@0.13.3
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:
12
12
1 . Create a NEAR key with ` near generate-key `
13
13
2 . Fetch NEAR tokens from an available faucet, at last deploy around 100~ NEAR were needed.
14
14
3 . 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.
16
16
- ` list(bytes.fromhex(hash)) ` in Python to get a byte array.
17
17
- Replace the ` codehash ` field in deploy.sh for the initial codehash.
18
18
- 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() -> (
27
27
28
28
// Deploy Pyth
29
29
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" ) )
31
31
. await
32
- . expect ( "Failed to deploy pyth .wasm" ) ;
32
+ . expect ( "Failed to deploy pyth_near .wasm" ) ;
33
33
34
34
// Deploy Wormhole Stub, this is a dummy contract that always verifies VAA's correctly so we
35
35
// can test the ext_wormhole API.
Original file line number Diff line number Diff line change @@ -10,7 +10,7 @@ set -euo pipefail
10
10
rustup target add wasm32-unknown-unknown
11
11
12
12
cargo 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 .
14
14
15
15
(
16
16
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)
28
28
# Deploy..
29
29
near deploy \
30
30
--accountId " pyth.testnet" \
31
- --wasmFile pyth .wasm \
31
+ --wasmFile pyth_near .wasm \
32
32
--initFunction new \
33
33
--initArgs " $INIT_JSON "
You can’t perform that action at this time.
0 commit comments