You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
In YUL there are two opcodes to load and store immutables. Immutables are indexed so we can store them just as a byte array. Storing is only allowed in the constructor (in EVM they are constants in the runtime code). We'd instead store them tied to the contract before returning from the constructor; the contract can then load them lazily on the first access. Delegate calls prevent us from storing them in regular contract storage.
To make it work for upgradable contracts using set_code_hash we must require that the new code was uploaded and instantiated, otherwise the immutables are missing.
The text was updated successfully, but these errors were encountered:
In YUL there are two opcodes to load and store immutables. Immutables are indexed so we can store them just as a byte array. Storing is only allowed in the constructor (in EVM they are constants in the runtime code). We'd instead store them tied to the contract before returning from the constructor; the contract can then load them lazily on the first access. Delegate calls prevent us from storing them in regular contract storage.
To make it work for upgradable contracts using
set_code_hash
we must require that the new code was uploaded and instantiated, otherwise the immutables are missing.The text was updated successfully, but these errors were encountered: