Remix makes it so easy to get the JSON ABI.
Does anyone have any recommendation on how best to get the JSON ABI after successfully deploying a contract using Truffle without having to leverage Remix?
abisoliditytruffle
Remix makes it so easy to get the JSON ABI.
Does anyone have any recommendation on how best to get the JSON ABI after successfully deploying a contract using Truffle without having to leverage Remix?
Best Answer
when you run
truffle creates and saves a json file per contract in
/yourProjectPath/build/contracts
. In this json file you'll find the abi, the bytecode, the topics (if you have anyevent
in your smart contract), the function definitions etc (you get the point I guess, I encourage you to spend some time understanding that file - just to get a broad understanding).personally I use python for my projects. Here is how I automatically load my abi into my scripts for transacting with my contracts (using web3py)
You can do the same with your favorite programming language or simply copying-pasting your abi by hand.