0

I'd like to make an application where a transaction occurs that creates a new contract, and an event is kicked of informing the listeners that this new contract has been created.

After that, the person who called the transaction is expected to listen to the Event and store the new contract address on their own persistent data store (the user has a monetary interest in storing the contract address until they wish to destroy it basically)

Is this a normal/secure pattern in the EVM?

2

Events are a safe form of storage, as they are permanently stored on the blockchain, and cannot be modified, however, there are some considerations.

Because events are stored on the blockchain, they are public, and anybody listening for your event will also be able to see any data stored using that event. This also means that if "forgetting" the contract address is an important aspect of your application, then that is essentially impossible as long as the blockchain exists.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.