[英]How to verify a contract on Avalanche testnet using Brownie
I am trying deploy and verify a contract using brownie on avalanche testnet.我正在尝试在雪崩测试网上使用 brownie 部署和验证合同。
The contract deploys and verifies fine on kovan.合约在 kovan 上部署和验证良好。 It deploys on avalanche testnet but I cannot get it verified.它部署在雪崩测试网上,但我无法对其进行验证。
The default brownie does not come with an explorer for avax testnet(kept getting explorer error) so I tried to add it.默认的布朗尼没有附带 avax testnet 的资源管理器(不断出现资源管理器错误),所以我尝试添加它。
I have tried variations of the testnet.snowtrace.io and they all give connection error except:我尝试了 testnet.snowtrace.io 的变体,它们都给出了连接错误,除了:
https://testnet.snowtrace.io/api - gives valueerror: error https://testnet.snowtrace.io/api - 给出 valueerror: 错误
I am using export SNOWTRACE_TOKEN= as per the documentation for avalanche and obtained an API key from https://snowtrace.io我根据雪崩的文档使用 export SNOWTRACE_TOKEN= 并从https://snowtrace.io获取 API 密钥
Any idea IF and how this can be accomplished?任何想法如果以及如何实现?
到目前为止,这似乎不适用于 avax-test,使用手动解决方法...... https://github.com/eth-brownie/brownie/issues/1417
Actually by default brownie "avax-test" network doesn't have set explorer field, So we have to set it manually by running below command,实际上默认情况下brownie“avax-test”网络没有设置资源管理器字段,所以我们必须通过运行以下命令手动设置它,
brownie networks modify avax-test explorer=https://api-testnet.snowtrace.io/api
And you will able to verify contract.您将能够验证合同。
Don't forget to add env variable, SNOWTRACE_TOKEN=YOUR_TOKEN
不要忘记添加环境变量, SNOWTRACE_TOKEN=YOUR_TOKEN
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.