Verified contractExactMIT
ForgAIEvmAmmBootstrap
Address0x97bcb817e645fcb416032dc321b28d00c020467b
- Balance
0 ETH
- Transactions
6
- Compiler
solc 0.8.36
- Same code
Only this contract
Details
- Compiler
- solc 0.8.36+commit.8a079791
- Language
- solidity
- Optimization
- Yes, 200 runs
- EVM version
- cancun
- Via IR
- yes
- License
- MIT
- Match
- Exactcreation code: yes, runtime code: yes
- Verified on Sourcify
- Created in block
- 26,409,607
- Creation transaction
- 0x847e90a0ba…1dfc9c8fbb
contracts/multichain/ForgAIEvmAmmBootstrap.sol
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.26;
/// @notice Deploy identically through a verified CREATE2 deployer on all four
/// chains. Contract-created addresses use this contract's sequence, never the
/// administrator EOA's historical nonce. No protocol asset or mint authority.
contract ForgAIEvmAmmBootstrap {
address public immutable administrator;
uint256 public nextStep=1;
event Deployed(uint256 indexed step,address indexed deployed,bytes32 initHash);
constructor(address admin){require(admin!=address(0),"ADMIN");administrator=admin;}
function deploy(uint256 step,bytes calldata init,address expected) external returns(address result){
require(msg.sender==administrator&&step==nextStep&&step<=5,"DEPLOY_SEQUENCE");
bytes memory code=init;assembly("memory-safe"){result:=create(0,add(code,32),mload(code))}
require(result==expected&&result.code.length>0,"DEPLOY_ADDRESS");nextStep++;
emit Deployed(step,result,keccak256(init));
}
function deployHook(bytes32 salt,bytes calldata init,address expected) external returns(address result){
require(msg.sender==administrator&&nextStep==6,"DEPLOY_SEQUENCE");
bytes memory code=init;assembly("memory-safe"){result:=create2(0,add(code,32),mload(code),salt)}
require(result==expected&&result.code.length>0&&(uint160(result)&0x3fff)==0x20cc,"HOOK_ADDRESS");nextStep=7;
emit Deployed(6,result,keccak256(init));
}
}
Compiler settingsShow
{
"viaIR": true,
"optimizer": {
"runs": 200,
"enabled": true
},
"evmVersion": "cancun"
}Source code and metadata: Sourcify.
The source code belongs to the authors of the contract.