OTP-003: Self-ABI reporting
This proposal defines how to report the contract’s ABI using an IPFS link.
Motivation
Usually, the ABI is supplied separately using a third-party service or via a repository on GitHub. This proposal suggests adding a new method of self-reporting the contract’s ABI using a link to IPFS. This will allow us to avoid any third-party dependency and enable anyone to build tools that rely on the ABI, such as explorers, wallets, etc.
Specification
To support this proposal, the contract should implement OTP-001 and report an interface org.ton.abi.ipfs.v0
. Then implement a get method get_abi_ipfs
that returns a string with an IPFS link to the ABI file. The link should be in the format ipfs://<hash>
.
Drawbacks
- There is no way to upgrade the ABI without updating the contract. This drawback exists only for hardcoded links.