MSafe | Aptos
  • Overview
    • MSafe Overview
    • What can you do with MSafe wallet?
      • Why Multi-Sig & Non-Custodial
      • MSafe Wallet Key Benefits
    • Use Cases
      • Treasury Management
      • Smart Contract Deployment & Update
      • Protocol Admin Control
      • dApp Store Integration
    • Security
  • Users
    • Glossary
    • Launch App
    • Connect Wallet
    • Navigation Bar
    • Address Book
    • Create an Account
      • Initiate Creation
      • Co-Managers to Accept
    • Switch btw Accounts
    • Deposit / Receive
    • View Assets
    • View Pending Txn
    • View Txn History
    • Propose Transaction (Enable NFT, Send, Register Coin)
      • Enable NFT
      • Send
      • Add Coin
    • Approve Transaction
      • Co-Managers to Approve Enable NFT
      • Co-Managers to Approve Send
      • Co-Manager to Approve Add Coin
    • Change Vote
    • Reject Transaction
      • Co-Managers to Reject
    • Execute Transaction
      • Execute Approval
      • Execute Rejection
    • App Store
      • Use dApps
    • MSafe 1.0 User guide
      • Connect Wallet
      • First time registration
      • Create an MSafe Account
      • Receive Coin
      • Coin Transfer (APT)
      • DAPP Store
      • Add a new coin
      • Address Book
      • Permissions
      • Wallet FAQs
  • Developers
    • Overview
    • System
      • Auth-key & Multi-Ed25519
      • Backend Walk Through
      • MSafe Contracts
    • Interactive CLI
      • Installation
      • CLI arguments
      • Register and View
      • Create a MSafe Wallet
      • Approve / execute a transaction
      • Transfer Coin
      • Smart Contract | Module Publish
      • Entry Function
      • Reject a transaction
      • Migration from MSafe 1.0 to MSafe 2.0
    • SDK
      • Smart Contract | Deploy a MOVE Module
      • Call An Entry Function
    • Integrate with MSafe (DAPP)
      • FAQ
    • Move Module Publish
  • Product updates
    • 2022 Q4
Powered by GitBook
On this page
  1. Developers
  2. SDK

Smart Contract | Deploy a MOVE Module

scripts/deploy.ts is the script used to deploy the move module.

You will need to finish the following items as the prerequisite before calling this script.

  1. You have ready have a MSafe wallet created with the account in config.yaml in step 1.

  2. Deployer address is replaced with the MSafe address in Move.toml

  3. MOVE module is compiled with flag --save-metadata

After compiled the move module, call

yarn run deploy --msafe ${MSAFE_ADDRESS} --move-dir ./tests/move

There is some test contracts in folder ./test/move that you may try it out.

Action:			Module publish
Verify Hash:		0x80e3c2779b714ab355ecc6fc4c8db221e770adb127a18ebfb150f11d9ca65edc
Deployer:		0x1908fe0d337d7bd718c8465030c5f306377ac396f3d7acce92f526ae41637cc0
Package:		MomentumSafe-test
Upgrade Policy:		compatible
Upgrade Number:		0
Source Digest:		BC36D67FB3DE5ABD5541BCAF633C28E1EFECF0DDDED20544296DCA98F744DE82
Modules:		0x1908fe0d337d7bd718c8465030c5f306377ac396f3d7acce92f526ae41637cc0::message
			0x1908fe0d337d7bd718c8465030c5f306377ac396f3d7acce92f526ae41637cc0::test_coin
Dependency:		0x0000000000000000000000000000000000000000000000000000000000000001::AptosFramework
			0x0000000000000000000000000000000000000000000000000000000000000001::AptosStdlib
			0x0000000000000000000000000000000000000000000000000000000000000001::MoveStdlib
Sender:			0x1908fe0d337d7bd718c8465030c5f306377ac396f3d7acce92f526ae41637cc0
Sequence Number:	8
Expiration:		Thu Oct 13 2022 18:00:20 GMT-0700 (Pacific Daylight Time)
Gas Price:		100
Max Gas:		5000

--------------------

Do you confirm with the transaction? [Y/n]

The script will load compiled move modules from move directory and print message about the code deployment.

After confirm, the transaction to initiate the multi-sig transaction request will be confirmed on blockchain. You may confirm the transaction and submit the signature through interactive CLI or Web App.

PreviousSDKNextCall An Entry Function

Last updated 2 years ago