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
Today when you deploy a new contract we use executeSC with a contract calling the createSC() Assemblyscript function.
Then there is nothing to get the address of deployed contract.
What is done today to handle this:
the deployer SC emit an event containing the SC address.
Imho this is really ugly because we have to rely on the event string and can lead to various problems like collision with others user defined events.
Proposed solution 1:
Having a new field in event 'eventType'. types could be userEvents or SystemEvents.
A call to the createSC() could emit a systemEvent containing the address.
Some errors could also be of type of systemEvents.
Of course each SystemEvent should have an eventID so we can directly know which event it is without parsing the string...
This will also greatly improve our capacity of handling Smart contract errors.
Proposed solution 2:
when createSC() ABI is called, get the SC address.
Include the Deployed SC address somewhere in the api. by instance adding a new filed in "get_operations" that list the new SC created by the operation
The text was updated successfully, but these errors were encountered:
I like the SystemEvent option.
But I like the other one you proposed here even more: #4767 : applied to returning the deployed address from the function deploying the SC
Today when you deploy a new contract we use executeSC with a contract calling the createSC() Assemblyscript function.
Then there is nothing to get the address of deployed contract.
What is done today to handle this:
the deployer SC emit an event containing the SC address.
Imho this is really ugly because we have to rely on the event string and can lead to various problems like collision with others user defined events.
Proposed solution 1:
Having a new field in event 'eventType'. types could be userEvents or SystemEvents.
A call to the createSC() could emit a systemEvent containing the address.
Some errors could also be of type of systemEvents.
Of course each SystemEvent should have an eventID so we can directly know which event it is without parsing the string...
This will also greatly improve our capacity of handling Smart contract errors.
Proposed solution 2:
when createSC() ABI is called, get the SC address.
Include the Deployed SC address somewhere in the api. by instance adding a new filed in "get_operations" that list the new SC created by the operation
The text was updated successfully, but these errors were encountered: