You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Right now the contract state has to be initialized with the full vector of information (participant id, url, account id etc), but ideally everything except for account id should be fillied in by the node itself to give more flexibility on deployment.
The text was updated successfully, but these errors were encountered:
So that method is only called once by the entity that deploys the smart contract. That entity does not necessarily know all nodes information (their URL, id etc). With the exception of account ID which is the essential part of being able to authorize nodes' calls to the smart contract.
Instead of accepting participants: BTreeMap<AccountId, ParticipantInfo> this method should just accept Vec<AccountId> which "pre-initializes" the contract (you can create a new state struct if that helps). Then each of the nodes in that list would be allowed to call some new method init_participant(info: ParticipantInfo) that fills information for the specific node that makes the call (authorized through signer_id). Once we have all the information we can consider the state to be initialized.
Feel free to stray away from the above of course if that would make more sense. I am just sharing my high-level vision not what absolutely needs to be done.
Description
Right now the contract state has to be initialized with the full vector of information (participant id, url, account id etc), but ideally everything except for account id should be fillied in by the node itself to give more flexibility on deployment.
The text was updated successfully, but these errors were encountered: