CRYPTO NEWS

Can you create and destroy a contract in a single transaction?

Is it possible to create and destroy a contract in a single transaction? Specifically could I:

  • deploy to a known address using CREATE2
  • call a function on that contract
  • destroy the contract and recover some of the deployment cost

all in one transaction?

Second part of the question. If that is possible would the account submitting the transaction need to have the full gas amount to deploy the contract or would I only need to provide the deployment cost minus the refund from self-destruct?

How to understand if a contract has been renounced programmatically?

Is there a way to query the blockchain to find out the current owner of the smart contract programmatically? I mean not the address that deployed the contract, but the one that is currently the owner. These might not be the same if the previous owner renounced or transferred ownership. Maybe there is a method::Listen

Is there a way to query the blockchain to find out the current owner of the smart contract programmatically? I mean not the address that deployed the contract, but the one that is currently the owner.

These might not be the same if the previous owner renounced or transferred ownership.

Maybe there is a method in ethers.js, web3.js, or GraphQL to check if the current owner is still the address that deployed the contract?

Thank you

Can you create and destroy a contract in a single transaction?

Shopping cart
There are no products in the cart!
Continue shopping
0