Code Monkey home page Code Monkey logo

Comments (3)

kchain-solutions avatar kchain-solutions commented on August 29, 2024

ISSUE UPDATE

I also try do it through the makefile with the following target:

publish-counter: 
	cd apps/counter && aptos move publish --included-artifacts=${included_artifacts} --named-addresses layerzero_common=${layerzero_common},msglib_auth=${msglib_auth},zro=${zro},msglib_v1_1=${msglib_v1_1},msglib_v2=${msglib_v2},executor_auth=${executor_auth},executor_v2=${executor_v2},layerzero=${layerzero},counter=default

The error is still the same

package size 2113 bytes
{
  "Error": "Simulation failed with status: Move abort in 0x1::code: EPACKAGE_DEP_MISSING(0x60005): Dependency could not be resolved to any published package."
}

from layerzero-aptos-contract.

kchain-solutions avatar kchain-solutions commented on August 29, 2024

I made progress. I added to the makefile lines to publish the modules required.

publish-layerzero-common: 
	cd layerzero-common && aptos move publish --named-addresses layerzero_common=${layerzero_common}

publish-msglib-auth: 
	cd msglib/msglib-auth && aptos move publish --named-addresses msglib_auth=${msglib_auth},layerzero_common=${layerzero_common}

publish-zro:
	cd zro/ && aptos move publish --named-addresses zro=${zro}

publish-msglib-v1-1: 
	cd msglib/msglib-v1/msglib-v1-1 && aptos move publish --named-addresses msglib_v1_1=${msglib_v1_1},zro=${zro},layerzero_common=${layerzero_common},msglib_auth=${msglib_auth}

publish-msglib-v2: 
	cd msglib/msglib-v2 && aptos move publish --named-addresses msglib_v2=${msglib_v2},zro=${zro},layerzero_common=${layerzero_common},msglib_auth=${msglib_auth}

publish-executor-auth: 
	cd executor/executor-auth && aptos move publish --named-addresses layerzero_common=${layerzero_common},executor_auth=${executor_auth}

publish-executor-v2: 
	cd executor/executor-v2 && aptos move publish --named-addresses layerzero_common=${layerzero_common},executor_auth=${executor_auth},executor_v2=${executor_v2}

publish-layerzero:
	cd layerzero && aptos move publish --included-artifacts=${included_artifacts} --named-addresses layerzero_common=${layerzero_common},msglib_auth=${msglib_auth},zro=${zro},msglib_v1_1=${msglib_v1_1},msglib_v2=${msglib_v2},executor_auth=${executor_auth},executor_v2=${executor_v2},layerzero=${layerzero}

publish-counter: 
	cd apps/counter && aptos move publish --included-artifacts=${included_artifacts} --named-addresses layerzero_common=${layerzero_common},msglib_auth=${msglib_auth},zro=${zro},msglib_v1_1=${msglib_v1_1},msglib_v2=${msglib_v2},executor_auth=${executor_auth},executor_v2=${executor_v2},layerzero=${layerzero},counter=${counter}

But when I Try to make publish-counter

I've got this error

LayerZero-Aptos-Contract >> make publish-counter
cd apps/counter && aptos move publish --included-artifacts="none" --named-addresses layerzero_common=0x7a705eaa4ad5eae532f2b4c7e51c10584362281b5029c0ebef7005d44bc4e590,msglib_auth=0x7a705eaa4ad5eae532f2b4c7e51c10584362281b5029c0ebef7005d44bc4e590,zro=0x7a705eaa4ad5eae532f2b4c7e51c10584362281b5029c0ebef7005d44bc4e590,msglib_v1_1=0x7a705eaa4ad5eae532f2b4c7e51c10584362281b5029c0ebef7005d44bc4e590,msglib_v2=0x7a705eaa4ad5eae532f2b4c7e51c10584362281b5029c0ebef7005d44bc4e590,executor_auth=0x7a705eaa4ad5eae532f2b4c7e51c10584362281b5029c0ebef7005d44bc4e590,executor_v2=0x7a705eaa4ad5eae532f2b4c7e51c10584362281b5029c0ebef7005d44bc4e590,layerzero=0x7a705eaa4ad5eae532f2b4c7e51c10584362281b5029c0ebef7005d44bc4e590,counter=0x7a705eaa4ad5eae532f2b4c7e51c10584362281b5029c0ebef7005d44bc4e590
package size 2081 bytes
{
  "Error": "Simulation failed with status: Execution failed in 0x7a705eaa4ad5eae532f2b4c7e51c10584362281b5029c0ebef7005d44bc4e590::endpoint::insert_ua at code offset 3"
}

from layerzero-aptos-contract.

kchain-solutions avatar kchain-solutions commented on August 29, 2024

Procedure to publish counter.move

1) Setup makefile.config

layerzero_common=0x4806f0f896e6648f86be542b51729edae2ccf6e23890923c9c7ef9d4720365f7
msglib_auth=0x4806f0f896e6648f86be542b51729edae2ccf6e23890923c9c7ef9d4720365f7
zro=0x4806f0f896e6648f86be542b51729edae2ccf6e23890923c9c7ef9d4720365f7
msglib_v2=0x4806f0f896e6648f86be542b51729edae2ccf6e23890923c9c7ef9d4720365f7
executor_auth=0x4806f0f896e6648f86be542b51729edae2ccf6e23890923c9c7ef9d4720365f7
layerzero=0x4806f0f896e6648f86be542b51729edae2ccf6e23890923c9c7ef9d4720365f7
executor_v2=0x4806f0f896e6648f86be542b51729edae2ccf6e23890923c9c7ef9d4720365f7
msglib_v1_1=0x4806f0f896e6648f86be542b51729edae2ccf6e23890923c9c7ef9d4720365f7
included_artifacts="none"

here an example

2) Edit makefile

publish-layerzero-common: 
	cd layerzero-common && aptos move publish --named-addresses layerzero_common=${layerzero_common}

publish-msglib-auth: 
	cd msglib/msglib-auth && aptos move publish --named-addresses msglib_auth=${msglib_auth},layerzero_common=${layerzero_common}

publish-zro:
	cd zro/ && aptos move publish --named-addresses zro=${zro}

publish-msglib-v1-1: 
	cd msglib/msglib-v1/msglib-v1-1 && aptos move publish --named-addresses msglib_v1_1=${msglib_v1_1},zro=${zro},layerzero_common=${layerzero_common},msglib_auth=${msglib_auth}

publish-msglib-v2: 
	cd msglib/msglib-v2 && aptos move publish --named-addresses msglib_v2=${msglib_v2},zro=${zro},layerzero_common=${layerzero_common},msglib_auth=${msglib_auth}

publish-executor-auth: 
	cd executor/executor-auth && aptos move publish --named-addresses layerzero_common=${layerzero_common},executor_auth=${executor_auth}

publish-executor-v2: 
	cd executor/executor-v2 && aptos move publish --named-addresses layerzero_common=${layerzero_common},executor_auth=${executor_auth},executor_v2=${executor_v2}

publish-layerzero:
	cd layerzero && aptos move publish --included-artifacts=${included_artifacts} --named-addresses layerzero_common=${layerzero_common},msglib_auth=${msglib_auth},zro=${zro},msglib_v1_1=${msglib_v1_1},msglib_v2=${msglib_v2},executor_auth=${executor_auth},executor_v2=${executor_v2},layerzero=${layerzero}

publish-counter: 
	cd apps/counter && aptos move publish --included-artifacts=${included_artifacts} --named-addresses layerzero_common=${layerzero_common},msglib_auth=${msglib_auth},zro=${zro},msglib_v1_1=${msglib_v1_1},msglib_v2=${msglib_v2},executor_auth=${executor_auth},executor_v2=${executor_v2},layerzero=${layerzero},counter=${counter}

Publish the modules in this order.
NB call make publish-counter at step 5).

3) Init functions

aptos move run --function-id 0x7a705eaa4ad5eae532f2b4c7e51c10584362281b5029c0ebef7005d44bc4e590::endpoint::init --args u64:10108

4) Fix bugs

layerzero/sources/executor_config.move

    public(friend) fun init_executor_config<UA>(account: &signer) {
        assert_type_signer<UA>(account);
        if(!exists<ConfigStore>(signer::address_of(account))){
            move_to(account, ConfigStore {
                config: table::new(),
            });
        }
    }

layerzero/sources/msglib_config.move

    public(friend) fun init_msglib_config<UA>(account: &signer){
        assert_type_signer<UA>(account);
        if(!exists<MsgLibConfig>(signer::address_of(account))){
            move_to(account, MsgLibConfig {
                send_version: table::new(),
                receive_version: table::new(),
            });
        }
    }

5) Deploy counter.move

make publish-counter

6) Create counter

aptos move run --function-id default::counter::create_counter --args u64:0

from layerzero-aptos-contract.

Related Issues (4)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.