0

After deploy aptos contract , I want to get the contract json format abi.

I found that the transaction payload , changes field can get json format abi.

Such as https://explorer.aptoslabs.com/txn/0x7bbb1d19c59ff863fd89176d8fcb2d60f0e43a9b6e22697587b9994aefae36f5/changes

But Not every deploy contract transaction contains the abi. If the contract has bean deployed and didn't change , the transaction cannot found the abi.

So is there any other way can get the contract json format abi ?, such as from the decode the bsc file ?

莫海江
  • 11
  • 1

1 Answers1

0

You can read the ABI of a Move module using this endpoint: https://fullnode.mainnet.aptoslabs.com/v1/spec#/operations/get_account_module.

For example:

curl 'https://fullnode.mainnet.aptoslabs.com/v1/accounts/0x1/module/coin'
Daniel Porteous
  • 5,536
  • 3
  • 25
  • 44