-
EnvironmentTestnet Acknowledgement
Issue Descriptionimport * as GREETER_CONTRACT_ABI from "./abi.json"; // TODO: Complete and import the ABI const initializeProviderAndSigner = async () => { const initializeProviderAndSigner = async () => { const erc_abi = [ contract = new Contract(GREETER_CONTRACT_ADDRESS, erc_abi, signer); Expected Behaviornone Code Examplenone Repo Link (Optional)No response |
Beta Was this translation helpful? Give feedback.
Replies: 5 comments
-
It appears that there was an issue with importing the ABI from the JSON file. Ensure that the ABI is properly formatted and exported in the JSON file. Alternatively, define the ABI directly in the code as shown in the provided workaround. |
Beta Was this translation helpful? Give feedback.
-
The |
Beta Was this translation helpful? Give feedback.
The
abi.json
file from the frontend quickstart tutorial is not the full artifact generated by the compiler, but only theabi
part of it. That's why it worked when you created theerc_abi
variable. You can either do that or, if you copy/past the full artifact, reference it usingGREETER_CONTRACT_ABI.abi
later on.