Unable to initialize empty mapping #784
Unanswered
deepaktrama
asked this question in
Q&A
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Unable to initialize empty mapping as described in solidity documentation. Using solana.
campaigns[campaignID] = Campaign(beneficiary, goal, 0, 0); gives error on line 25 - "struct 'Campaign' has 5 fields, not 4"
Also tried using curly brace syntax and still getting an error.
Will appreciate it if someone can let me know how to work around this.
Complete code below, it is just copied from solidity docs.
https://ethereum.stackexchange.com/questions/62784/how-to-initialize-a-new-struct-with-an-empty-mapping
Beta Was this translation helpful? Give feedback.
All reactions