File tree Expand file tree Collapse file tree 9 files changed +176
-11
lines changed Expand file tree Collapse file tree 9 files changed +176
-11
lines changed Original file line number Diff line number Diff line change @@ -8,8 +8,8 @@ Provide an execution framework and proof-of-concept (PoC) service for [Wormhole]
88
99- [x] [ EVM] ( ./evm/ )
1010- [x] [ SVM] ( ./svm/ )
11- - [x] Sui Move
12- - [ ] Aptos Move
11+ - [x] [ Sui Move] ( ./sui/ )
12+ - [x] [ Aptos Move] ( ./aptos/ )
1313
1414## Background
1515
Original file line number Diff line number Diff line change 1+ # Executor EVM Deployments
2+
3+ ## Testnet
4+
5+ ### April 24, 2025
6+
7+ Executor: [ 0x139717c339f08af674be77143507a905aa28cbc67a0e53e7095c07b630d73815] ( https://explorer.aptoslabs.com/account/0x139717c339f08af674be77143507a905aa28cbc67a0e53e7095c07b630d73815/resources?network=testnet )
8+
9+ Executor Requests: [ 0xf6cc46a85f8cac9852c62904f09ec7fc9d3fe41ff646913853bed2a992c1d6d7] ( https://explorer.aptoslabs.com/account/0xf6cc46a85f8cac9852c62904f09ec7fc9d3fe41ff646913853bed2a992c1d6d7/resources?network=testnet )
Original file line number Diff line number Diff line change 1+ # Aptos
2+
3+ The executor folder was generated with ` aptos move init --name executor ` .
4+
5+ This module was developed with aptos CLI ` 7.2.0 ` . It should generally match the Sui implementation with minor changes necessary for Aptos-specific implementation details.
6+
7+ ## Development
8+
9+ [ Move IDE Plugins] ( https://aptos.dev/en/build/smart-contracts#move-ide-plugins )
10+
11+ ### Compile
12+
13+ ``` bash
14+ aptos move compile --named-addresses executor=default
15+ ```
16+
17+ ### Test
18+
19+ ``` bash
20+ aptos move test --named-addresses executor=default
21+ ```
22+
23+ For coverage, add the ` --coverage ` flag.
24+
25+ ``` bash
26+ aptos move test --coverage --named-addresses executor=default
27+ ```
28+
29+ ### Deploy
30+
31+ First initialize the config, setting the desired network and deployment private key.
32+
33+ ``` bash
34+ cd executor
35+ aptos init
36+ ```
37+
38+ Then, publish the module immutably via a resource account.
39+
40+ ``` bash
41+ aptos move create-resource-account-and-publish-package --address-name executor --seed-encoding Utf8 --seed executorv1
42+ ```
43+
44+ Repeat this with the ` executor_requests ` module.
45+
46+ ``` bash
47+ cd executor
48+ aptos init
49+ aptos move create-resource-account-and-publish-package --address-name executor_requests --named-addresses executor=< ADDRESS_FROM_PREVIOUS_STEP> --seed-encoding Utf8 --seed executor_requestsv1
50+ ```
Original file line number Diff line number Diff line change 11#! /bin/bash
22
3- for dir in * / # list directories in the form "/tmp/dirname/"
4- do
5- dir= ${dir %*/ } # remove the trailing "/ "
6- cd ${dir}
7- aptos init --skip-faucet
8- sh -c " aptos move test --coverage --named-addresses ${dir} =default "
9- sh -c " aptos move coverage summary --named-addresses ${dir} =default | grep \" Move Coverage: 100.00 \" "
10- cd ..
11- done
3+ cd executor
4+ aptos init --skip-faucet
5+ sh -c " aptos move test --coverage --named-addresses executor=default "
6+ sh -c " aptos move coverage summary --named-addresses executor=default | grep \" Move Coverage: 100.00 \" "
7+ cd ../executor_requests
8+ aptos init --skip-faucet
9+ sh -c " aptos move test -- coverage --named-addresses executor =default,executor_requests=default "
10+ sh -c " aptos move coverage summary --named-addresses executor=default,executor_requests=default | grep \" Move Coverage: 100.00 \" "
11+ cd ..
Original file line number Diff line number Diff line change 1+ .aptos /
2+ build /
Original file line number Diff line number Diff line change 1+ .aptos /
2+ build /
Original file line number Diff line number Diff line change 1+ [package ]
2+ name = " executor_requests"
3+ version = " 1.0.0"
4+ license = " Apache 2.0"
5+ authors = [" Wormhole Labs" ]
6+
7+ [dependencies .executor ]
8+ local = " ../executor"
9+
10+ [addresses ]
11+ executor_requests = " _"
12+
13+ [dev-addresses ]
14+
15+ [dependencies .AptosFramework ]
16+ git = " https://github.com/aptos-labs/aptos-framework.git"
17+ rev = " mainnet"
18+ subdir = " aptos-framework"
19+
20+ [dev-dependencies ]
Original file line number Diff line number Diff line change 1+ // SPDX-License-Identifier: Apache-2.0
2+
3+ module executor_requests ::executor_requests {
4+ use std::vector;
5+ use executor::bytes;
6+
7+ const REQ_VAA_V1 : vector <u8 > = b"ERV1 ";
8+ const REQ_CCTP_V1 : vector <u8 > = b"ERC1 ";
9+
10+ const E_INVALID_VEC_LENGTH : u64 = 0 ;
11+
12+ public fun make_vaa_v1_request (
13+ emitter_chain: u16 ,
14+ emitter_address: vector <u8 >,
15+ sequence: u64
16+ ): vector <u8 > {
17+ assert !(emitter_address.length () == 32 ,E_INVALID_VEC_LENGTH );
18+ let ret = vector ::empty ();
19+ ret.append (REQ_VAA_V1 );
20+ bytes::push_u16_be (&mut ret, emitter_chain);
21+ ret.append (emitter_address);
22+ bytes::push_u64_be (&mut ret, sequence);
23+ ret
24+ }
25+
26+ public fun make_cctp_v1_request (
27+ src_domain: u32 ,
28+ nonce: u64 ,
29+ ): vector <u8 > {
30+ let ret = vector ::empty ();
31+ ret.append (REQ_CCTP_V1 );
32+ bytes::push_u32_be (&mut ret, src_domain);
33+ bytes::push_u64_be (&mut ret, nonce);
34+ ret
35+ }
36+ }
Original file line number Diff line number Diff line change 1+ // SPDX-License-Identifier: Apache-2.0
2+
3+ #[test_only]
4+ module executor_requests ::executor_requests_tests {
5+ use executor_requests::executor_requests;
6+
7+ #[test]
8+ fun test_make_vaa_v1_request () {
9+ let res = executor_requests::make_vaa_v1_request (
10+ 10002 ,
11+ x"000000000000000000000000d4a6a72a025599fd7357c0f157c718d0f5e38c76 ",
12+ 29
13+ );
14+ assert !(res == x"455256312712000000000000000000000000d4a6a72a025599fd7357c0f157c718d0f5e38c76000000000000001d ", 0 );
15+ }
16+
17+ #[test]
18+ fun test_make_cctp_v1_request () {
19+ let res = executor_requests::make_cctp_v1_request (
20+ 6 ,
21+ 6344
22+ );
23+ assert !(res == x"455243310000000600000000000018c8 ", 0 );
24+ }
25+
26+ #[test]
27+ #[expected_failure(abort_code = executor_requests::E_INVALID_VEC_LENGTH)]
28+ fun test_make_vaa_v1_request_fail_with_emitter_too_short () {
29+ executor_requests::make_vaa_v1_request (
30+ 10002 ,
31+ x"000000000000000000000000d4a6a72a025599fd7357c0f157c718d0f5e38c ",
32+ 29
33+ );
34+ }
35+
36+ #[test]
37+ #[expected_failure(abort_code = executor_requests::E_INVALID_VEC_LENGTH)]
38+ fun test_make_vaa_v1_request_fail_with_emitter_too_long () {
39+ executor_requests::make_vaa_v1_request (
40+ 10002 ,
41+ x"000000000000000000000000d4a6a72a025599fd7357c0f157c718d0f5e38c7600 ",
42+ 29
43+ );
44+ }
45+
46+ }
You can’t perform that action at this time.
0 commit comments