-
Originally asked on stack overflow. This question shows research effort; it is useful and clear 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. 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 ? |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments
-
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' |
Beta Was this translation helpful? Give feedback.
-
If you are interacting with the module in js/ts environment, you can also use surf to generate the typescript types for the module. |
Beta Was this translation helpful? Give feedback.
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'