wormhole-foundation / wormhole

A reference implementation for the Wormhole blockchain interoperability protocol.
https://wormhole.com
Other
1.66k stars 684 forks source link

How to import the wormhole wrapped coins in my Aptos move module? #4085

Open seiji0411 opened 1 month ago

seiji0411 commented 1 month ago

Description and context

https://aptoscan.com/account/28b98af2e2b8a6387ee392773135e0bf4b1f05e4c0c79ff51ab84a73e2454be8?module=stable_swap_adapter&viewMode=view#modules I found that this module has the dependences about Wormhole wrapped coins.

use WrappedCoin1::coin::T as WUSDC; // USD Coin (Wormhole)
use WrappedCoin2::coin::T as WWETH; // Wrapped Ether (Wormhole)
use WrappedCoin3::coin::T as WWTBT; // wTBT Pool

I tried to import Wrapped coins in my project as dependencies. But I did not success. Having error Move abort in 0x1::code: EPACKAGE_DEP_MISSING(0x60005): Dependency could not be resolved to any published package

These are files of wrapped coin module

[dependencies] AptosFramework = { git = "https://github.com/aptos-labs/aptos-core.git", subdir = "aptos-move/framework/aptos-framework/", rev = "aptos-cli-v3.3.1" }

[addresses] wrapped_coin_1="5e156f1207d0ebfa19a9eeff00d62a282278fb8719f4fab3a586a0a2c0fffbea"


- coin.move
```code
module wrapped_coin_1::coin {
    struct T has key {}
}

Actually I am wondering that your wrapped coins's module address and the deployed address are different.

I want to know how to make local dependences of your wrapped coins in my move module.

Please help me!

seiji0411 commented 1 month ago

Actually, building is successful. But while publishing on mainnet, it has the following error.

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