这是一个示例 - 。
这是我用于铸造的代理合同,问题是当我使用 Etherscan
API获取其ABI时,它没有 Mint
函数。 Mint
函数仅在基本合同上可用,这是一个 -
所以我的问题是是否有可能同时获得ABI或我如何知道我应该从哪里获得基础ABI。我正在使用 ethers
库。
This is an example - https://etherscan.io/address/0x769250862220d509fb9bed5f88d824c9fb74a833.
It is a proxy contract which I use for minting, the problem is it doesn't have mint
function when I use etherscan
API to get its ABI. Mint
function is only available on base contract which is this one - https://etherscan.io/address/0x29d1ab5f6bab57708a1935df104d985f4611dad6#code
So my question is if there is any possibility to get maybe both ABI's or how do I know where should I get base ABI. I am using ethers
library.
发布评论
评论(1)
就我的关注而言,除非在Explorer中验证合同,否则我们将无法获得ABI,而Ethers将永远不会给ABI,因为其中包括生成相同的合同来源。
我们来自Explorer的API,
https://docs.etherscan.io/api-endpoints/contracts#get-contract-contract-for-verified-contract-contract-source-codes
这适用于所有经过验证的合同,还具有限制请求率,,,,
As far as my concern, we cannot get abi unless the contract is verified in explorer, ethers will never give the abi, as that includes the contract source to generate the same.
we have the api's from explorers,
https://docs.etherscan.io/api-endpoints/contracts#get-contract-abi-for-verified-contract-source-codes
this works for all verified contracts, also has a limit rate of requests,