SStore2Deployer ​
This contract is open and can be called by any address. It provides functionality to deploy and read code using SSTORE2.
deployCode ​
solidity
function deployCode(bytes code_) external returns (address pointer_)
deploys code and emits an event with the pointer and code hash
Parameters ​
Name | Type | Description |
---|---|---|
code_ | bytes | code to deploy |
Return Values ​
Name | Type | Description |
---|---|---|
pointer_ | address | pointer to the deployed code |
deployCodeSplit ​
solidity
function deployCodeSplit(bytes code_) external returns (address pointer1_, address pointer2_)
deploys code and emits an event with the pointer and code hash
Parameters ​
Name | Type | Description |
---|---|---|
code_ | bytes | code to deploy |
Return Values ​
Name | Type | Description |
---|---|---|
pointer1_ | address | pointer to the first part of the deployed code |
pointer2_ | address | pointer to the second part of the deployed code |
readCode ​
solidity
function readCode(address pointer_) external view returns (bytes code_)
reads code from a pointer
Parameters ​
Name | Type | Description |
---|---|---|
pointer_ | address | pointer to the code |
Return Values ​
Name | Type | Description |
---|---|---|
code_ | bytes | code |
readCodeSplit ​
solidity
function readCodeSplit(address pointer1_, address pointer2_) external view returns (bytes code_)
LogCodeDeployed ​
solidity
event LogCodeDeployed(address pointer_, bytes32 codeHash_)
LogCodeDeployedSplit ​
solidity
event LogCodeDeployedSplit(address pointer1_, address pointer2_, bytes32 codeHash_)