I have multiple smart contracts that share a common structure, each containing two fields: destination and owner, which hold the same values. I would like to update the destination or owner values for all these contracts while minimizing gas fees. Are there any efficient methods?(such as batch processing or move these fields into another smart contract and using them or etc ...)

1 Answer 1


Multiple contracts point to the variables of a certain contract (access or modification, you can set a whitelist if you don’t want anyone to modify it). In this case, only modifying the state of a certain contract can effectively save gas compared with modifying the storage variable of multiple contracts.

  • Thanks, is this code for access control in some contract functions safe and save gas? address owner = PointedContract(address).getOwner(); require(msg.sender== owner);
    – softweng
    Jun 26, 2023 at 4:35

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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