Skip to content

clone

clone on chain move module into local deps, then you can use this module in your project

usage:

clone <network> <packageid>
      <network> mainnet, testnet, devnet, localnet
      <packageid> move on chain packageid

example

image you want to clone navx protocol from mainnet https://suivision.xyz/package/0x834a86970ae93a73faf4fff16ae40bdb72b91c47be585fff19a2af60a19ddca3

then you can type the following command

shell
clone mainnet 0x834a86970ae93a73faf4fff16ae40bdb72b91c47be585fff19a2af60a19ddca3
shell
sui@deepmove>clone mainnet 0x834a86970ae93a73faf4fff16ae40bdb72b91c47be585fff19a2af60a19ddca3
Download move bytecodes of 0x834a86970ae93a73faf4fff16ae40bdb72b91c47be585fff19a2af60a19ddca3 from https://fullnode.mainnet.sui.io:443
Disassemble move bytecodes of 0x834a86970ae93a73faf4fff16ae40bdb72b91c47be585fff19a2af60a19ddca3 into move interfaces
Disassemble move bytecodes of 0x1ee7b04f04ef049a6d711d0c0446d7b67b63c27c1397efa9536145085a4d1b7c into move interfaces
Disassemble move bytecodes of 0x3a75968d0951fc99e7b336b26088d0f6888efd691b9cf2ac61c3958cfaa6d41b into move interfaces
Disassemble move bytecodes of 0x5306f64e312b581766351c07af79c72fcb1cd25147157fdc2f8ad76de9a3fb6a into move interfaces
Disassemble move bytecodes of 0xc7abe17a209fcab08e2d7d939cf3df11f5b80cf03d10b50893f38df12fdebb07 into move interfaces
Disassemble move bytecodes of 0x04e20ddf36af412a4096f9014f4a565af9e812db9a05cc40254846cf6ed0ad91 into move interfaces
Disassemble move bytecodes of 0xc2d49bf5e75d2258ee5563efa527feb6155de7ac6f6bf025a23ee88cd12d5a83 into move interfaces
Update Move.toml [dependencies-remote] and [dependencies] of 0x834a86970ae93a73faf4fff16ae40bdb72b91c47be585fff19a2af60a19ddca3
Clone move bytecodes of 0x834a86970ae93a73faf4fff16ae40bdb72b91c47be585fff19a2af60a19ddca3 done!

then in your project local deps directory, you will see the following repos

clone2.png

and now in your Move.toml, the dependencies will be like this

[dependencies]
Sui = { local = "./deps/sui/crates/sui-framework/packages/sui-framework" }
0x834a86970ae93a73faf4fff16ae40bdb72b91c47be585fff19a2af60a19ddca3 = { local = "./deps/0x834a86970ae93a73faf4fff16ae40bdb72b91c47be585fff19a2af60a19ddca3" }

Released under the MIT License.