Skip to main content

One doc tagged with "Predicting Contract Addresses"

View All Tags

Predicting Contract Addresses Using Account Nonce

In Solidity, predicting contract addresses before their deployment can save substantial gas, especially when deploying interdependent contracts. This method eliminates the need for setter functions and storage variables, which are costly in terms of gas usage. We can use the LibRLP library from Solady to deterministically compute the addresses based on the deployer's nonce.