Cannot test addition of object to an array of struct #789
Replies: 3 comments 24 replies
-
I have listed two snippets from docs to help you with your project, as
Hope this helps! |
Beta Was this translation helpful? Give feedback.
-
@umair-mirza I think you should wait for a 1 block confirmation because you are storing. const transactionResponse = await stallionRace.createHorse("pony", 1, 1000000000);
await transactionResponse.wait(1); |
Beta Was this translation helpful? Give feedback.
-
console.log it and see whats going on |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
I am trying to test addition of an object to an array of struct like so:
The function in the contract file looks like this:
I am getting this error while testing with Chai:
AssertionError: expected +0 to be above +0
What could be the issue? I know that the function has an 'onlyOwner' modifier but do I need to call from it?
Beta Was this translation helpful? Give feedback.
All reactions