DEV Community

Discussion on: Writing smart contracts in ink!

Collapse
 
kubasiemion profile image
kubasiemion

Nice, but would not the self.env().account_id() resolve to the contract deployment address rather than the creator's address (on a real chain)?

Collapse
 
ayomide_bajo profile image
Bekka

Yes, It would be the contract address. This is a better option because it's more secure. You can also withdraw from the contract address, you can write the logic for this. I hope this helps.