简体   繁体   English

如何使用松露访问已部署合约的 abi?

[英]How to access abi of deployed contract with truffle?

I have deployed my contract on rinkeby test network, now I have to connect my contract with the frontend and for this I need to access the ABI of the deployed contract.我已经在 rinkeby 测试网络上部署了我的合约,现在我必须将我的合约与前端连接起来,为此我需要访问已部署合约的 ABI。 I am using truffle framework and I saw somewhere that ABI is in the build folder but I can't find it.我正在使用 truffle 框架,我在某个地方看到 ABI 在构建文件夹中,但我找不到它。 Please help请帮忙

You can find it in the auto-generated json file under the./build/contracts folder, and then just extract it.您可以在 ./build/contracts 文件夹下自动生成的 json 文件中找到它,然后将其解压缩。 For more detailed information you can read this article: https://piyopiyo.medium.com/how-to-get-contract-abi-in-truffle-22d0c0457ceb有关更多详细信息,您可以阅读这篇文章: https://piyopiyo.medium.com/how-to-get-contract-abi-in-truffle-22d0c0457ceb

Hope it is useful:)希望它有用:)

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM