Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
16 commits
Select commit Hold shift + click to select a range
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
365 changes: 217 additions & 148 deletions contracts/ForkingManager.sol

Large diffs are not rendered by default.

41 changes: 28 additions & 13 deletions contracts/interfaces/IForkingManager.sol
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,28 @@ interface IForkingManager is IForkableStructure {
uint64 forkID;
}

struct DeploymentConfig {
bytes32 genesisRoot;
string trustedSequencerURL;
string networkName;
string version;
address rollupVerifier;
address minter;
string tokenName;
string tokenSymbol;
uint256 arbitrationFee;
address chainIdManager;
uint256 forkPreparationTime;
address hardAssetManager;
uint32 lastUpdatedDepositCount; // starts at 0
bytes32 lastMainnetExitRoot;
bytes32 lastRollupExitRoot;
address parentGlobalExitRoot;
address parentZkEVM;
address parentForkonomicToken;
address parentBridge;
}

function zkEVM() external returns (address);

function bridge() external returns (address);
Expand All @@ -48,19 +70,12 @@ interface IForkingManager is IForkableStructure {

function isForkingExecuted() external returns (bool);

// Struct that holds an address pair used to store the new child contracts
struct AddressPair {
address one;
address two;
}

// Struct containing the addresses of the new instances
struct NewInstances {
AddressPair forkingManager;
AddressPair bridge;
AddressPair zkEVM;
AddressPair forkonomicToken;
AddressPair globalExitRoot;
struct NewInstance {
address zkEVM;
address bridge;
address forkonomicToken;
address globalExitRoot;
address forkingManager;
}

/**
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
{
"adjudicationFrameworkDisputeFee": 123,
"forkArbitratorDisputeFee": 200,
"arbitratorDisputeFee": 12,
"arbitratorOwner": null,
"realityETHAddress": null,
"initialArbitratorAddresses": []
}
18 changes: 18 additions & 0 deletions deployments/sepolia_1711689773/deploy_generated.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
{
"zkEVMDeployerAddress": "0x4e78730851Ec0d97B3785A1811e02b7e941c2943",
"createChildren": "0x219714200c7f774B152F8Cbb2571E049D4A56430",
"bridgeAssetOperations": "0x23748193fE94B8fdDc06A3f261cB5DB2dB21Dfac",
"forkableBridge": "0x91d8785bBa30E09255eC906F2bDfDf5919109b4f",
"forkonomicToken": "0x584f5e3B1d6f9274b7eeB5512c58ad0525804Ad4",
"chainIdManager": "0x94eF4E5637A07131062E75c397b8083c968a8DFb",
"verifierContract": "0xC8C0ab7485BaaF91698FC7a431801068df43c6c3",
"forkableZkEVM": "0x68Bdff669946bC9b30f0Ceb11c7004a47E41A91D",
"forkableGlobalExitRoot": "0x449Cd8D72cF668fab82E7DB5D856Dca7a8F53a4D",
"forkingManager": "0xB8A6158CF55f02A228C2Ecd6Aec722699297f0a5",
"proxyAdmin": "0x9029C03d935AdC24b3164bD289d5EAC8209afcc0",
"forkableGlobalExitRootPredicted": "0xdB7E1c8396483cBfa3e7D2728CE0c88452A29111",
"forkableZkEVMPredicted": "0xA75F4289b4b78Fd09c6C02b99E94EbE3B307A472",
"forkingManagerPredicted": "0x51F236d3482b3a923ee565259841a54426C5c141",
"forkonomicTokenPredicted": "0xF782C0A4708E9c9Ed84C66f8c4011F137A5E30e5",
"forkableBridgePredicted": "0xEA7ba7a39763ae484F616a9FB7E45beFB48b5D09"
}
27 changes: 27 additions & 0 deletions deployments/sepolia_1711689773/deploy_output.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
{
"polygonZkEVMAddress": "0xA75F4289b4b78Fd09c6C02b99E94EbE3B307A472",
"polygonZkEVMBridgeAddress": "0xEA7ba7a39763ae484F616a9FB7E45beFB48b5D09",
"polygonZkEVMGlobalExitRootAddress": "0xdB7E1c8396483cBfa3e7D2728CE0c88452A29111",
"forkingManager": "0x51F236d3482b3a923ee565259841a54426C5c141",
"maticTokenAddress": "0xF782C0A4708E9c9Ed84C66f8c4011F137A5E30e5",
"createChildrenImplementationAddress": "0x219714200c7f774B152F8Cbb2571E049D4A56430",
"bridgeOperationImplementationAddress": "0x23748193fE94B8fdDc06A3f261cB5DB2dB21Dfac",
"bridgeImplementationAddress": "0x91d8785bBa30E09255eC906F2bDfDf5919109b4f",
"verifierAddress": "0xC8C0ab7485BaaF91698FC7a431801068df43c6c3",
"zkEVMDeployerContract": "0x4e78730851Ec0d97B3785A1811e02b7e941c2943",
"deployerAddress": "0x55ddcD448cE2f52c29965B882279F120ec3506f8",
"timelockContractAddress": null,
"deploymentBlockNumber": 5582884,
"genesisRoot": "0x3a9a6ae2c73fff3ece22e24cc9caf0a6cf94ea0f5b0c350df3697663d0d47d10",
"trustedSequencer": "0x740a98F8f4fAe0986FB3264Fe4aaCf94ac1EE96f",
"trustedSequencerURL": "https://rpc.testnet.backstop.technology",
"chainID": 10101901,
"networkName": "BackstopL2",
"admin": "0x55ddcD448cE2f52c29965B882279F120ec3506f8",
"trustedAggregator": "0x5669C63E3B461cf50696AD0378fE2E66b982D4A7",
"proxyAdminAddress": "0x9029C03d935AdC24b3164bD289d5EAC8209afcc0",
"forkID": 6,
"salt": "0x1000000000000000000000000000000000000000000000000000000000000007",
"version": "0.0.1",
"minter": "0x55ddcD448cE2f52c29965B882279F120ec3506f8"
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
{
"l1GlobalChainInfoPublisher": "0xcDAdec0D1C09E8eD7e234cc51B4ECb5eEFD27b24",
"l1GlobalForkRequester": "0xc379D5a3B906F90df53a91e01e37E9A8CD966F0a"
}
27 changes: 27 additions & 0 deletions deployments/sepolia_1711689773/deploy_parameters.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
{
"realVerifier": false,
"trustedSequencerURL": "https://rpc.testnet.backstop.technology",
"networkName": "BackstopL2",
"version": "0.0.1",
"forkPreparationTime": 60,
"trustedSequencer": "0x740a98F8f4fAe0986FB3264Fe4aaCf94ac1EE96f",
"chainID": 10101901,
"trustedAggregator": "0x5669C63E3B461cf50696AD0378fE2E66b982D4A7",
"trustedAggregatorTimeout": 604799,
"pendingStateTimeout": 604799,
"forkID": 6,
"admin": "0x55ddcD448cE2f52c29965B882279F120ec3506f8",
"minter": "0x55ddcD448cE2f52c29965B882279F120ec3506f8",
"zkEVMOwner": "0x55ddcD448cE2f52c29965B882279F120ec3506f8",
"minDelayTimelock": 60,
"salt": "0x1000000000000000000000000000000000000000000000000000000000000007",
"deployerPvtKey": "",
"maxFeePerGas": "100",
"maxPriorityFeePerGas": "10",
"multiplierGas": "2",
"hardAssetManagerAddress": "0x55ddcD448cE2f52c29965B882279F120ec3506f8",
"arbitrationFee": "1000000000000000000",
"initialZkEVMDeployerOwner": "0x55ddcD448cE2f52c29965B882279F120ec3506f8",
"proxyAdminAddress": "0x1046398D1B36911C3ff59DE9A8A9Da0850C39b39",
"zkEVMDeployerAddress": "0x4e78730851Ec0d97B3785A1811e02b7e941c2943"
}
77 changes: 77 additions & 0 deletions deployments/sepolia_1711689773/genesis.json

Large diffs are not rendered by default.

249 changes: 249 additions & 0 deletions deployments/sepolia_1711689773/sepolia.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,249 @@
{
"manifestVersion": "3.2",
"admin": {
"address": "0x10E279EfB64728c68Ee3156364C69560692A9c83",
"txHash": "0x14b320f059ef21607a4a8e95d3e8c6429f282c498d70bf37d7f746f22c99363e"
},
"proxies": [
{
"address": "0xF5E879b316836b69e6c4758DDfc7424114117A55",
"txHash": "0x42cc38e7b99d05ec29238b38babe3861470b95abaee1634cb6f38fd914ce575f",
"kind": "transparent"
},
{
"address": "0x56d668aB764C65b9Ce3b4d2ebfA591302807e833",
"txHash": "0xebb479f54f630b8488408160917c9bed1a2ac3aa4f0dbc34a1751898fc791757",
"kind": "transparent"
},
{
"address": "0xb85aD4d0c00b973DA042aD8D0bd0750CB283d1e4",
"txHash": "0x59e74a69161f81794dd3c65ffa80d771aff7d56da1115ee2a5f5af8dae98d9f2",
"kind": "transparent"
}
],
"impls": {
"2f301487d4527a4ceab2cae79cbaa2518dca9554ffc7072eea6b060f6ffce48e": {
"address": "0x1E7Cac8f336f17B86e1348777C9cc9BB2348BEf3",
"txHash": "0x3c8fb78d3583edc3b7f52fb3363a1260ee6d2ea61486dcf6009fb73f3a025b21",
"layout": {
"solcVersion": "0.8.20",
"storage": [
{
"label": "_initialized",
"offset": 0,
"slot": "0",
"type": "t_uint8",
"contract": "Initializable",
"src": "@openzeppelin/contracts-upgradeable/proxy/utils/Initializable.sol:63",
"retypedFrom": "bool"
},
{
"label": "_initializing",
"offset": 1,
"slot": "0",
"type": "t_bool",
"contract": "Initializable",
"src": "@openzeppelin/contracts-upgradeable/proxy/utils/Initializable.sol:68"
},
{
"label": "__gap",
"offset": 0,
"slot": "1",
"type": "t_array(t_uint256)50_storage",
"contract": "ContextUpgradeable",
"src": "@openzeppelin/contracts-upgradeable/utils/ContextUpgradeable.sol:40"
},
{
"label": "_balances",
"offset": 0,
"slot": "51",
"type": "t_mapping(t_address,t_uint256)",
"contract": "ERC20Upgradeable",
"src": "@openzeppelin/contracts-upgradeable/token/ERC20/ERC20Upgradeable.sol:40"
},
{
"label": "_allowances",
"offset": 0,
"slot": "52",
"type": "t_mapping(t_address,t_mapping(t_address,t_uint256))",
"contract": "ERC20Upgradeable",
"src": "@openzeppelin/contracts-upgradeable/token/ERC20/ERC20Upgradeable.sol:42"
},
{
"label": "_totalSupply",
"offset": 0,
"slot": "53",
"type": "t_uint256",
"contract": "ERC20Upgradeable",
"src": "@openzeppelin/contracts-upgradeable/token/ERC20/ERC20Upgradeable.sol:44"
},
{
"label": "_name",
"offset": 0,
"slot": "54",
"type": "t_string_storage",
"contract": "ERC20Upgradeable",
"src": "@openzeppelin/contracts-upgradeable/token/ERC20/ERC20Upgradeable.sol:46"
},
{
"label": "_symbol",
"offset": 0,
"slot": "55",
"type": "t_string_storage",
"contract": "ERC20Upgradeable",
"src": "@openzeppelin/contracts-upgradeable/token/ERC20/ERC20Upgradeable.sol:47"
},
{
"label": "__gap",
"offset": 0,
"slot": "56",
"type": "t_array(t_uint256)45_storage",
"contract": "ERC20Upgradeable",
"src": "@openzeppelin/contracts-upgradeable/token/ERC20/ERC20Upgradeable.sol:376"
},
{
"label": "forkmanager",
"offset": 0,
"slot": "101",
"type": "t_address",
"contract": "ForkableStructure",
"src": "contracts/mixin/ForkableStructure.sol:10"
},
{
"label": "parentContract",
"offset": 0,
"slot": "102",
"type": "t_address",
"contract": "ForkableStructure",
"src": "contracts/mixin/ForkableStructure.sol:13"
},
{
"label": "children",
"offset": 0,
"slot": "103",
"type": "t_mapping(t_uint256,t_address)",
"contract": "ForkableStructure",
"src": "contracts/mixin/ForkableStructure.sol:20"
},
{
"label": "__gap",
"offset": 0,
"slot": "104",
"type": "t_array(t_uint256)50_storage",
"contract": "ERC165Upgradeable",
"src": "@openzeppelin/contracts-upgradeable/utils/introspection/ERC165Upgradeable.sol:41"
},
{
"label": "_roles",
"offset": 0,
"slot": "154",
"type": "t_mapping(t_bytes32,t_struct(RoleData)6951_storage)",
"contract": "AccessControlUpgradeable",
"src": "@openzeppelin/contracts-upgradeable/access/AccessControlUpgradeable.sol:57"
},
{
"label": "__gap",
"offset": 0,
"slot": "155",
"type": "t_array(t_uint256)49_storage",
"contract": "AccessControlUpgradeable",
"src": "@openzeppelin/contracts-upgradeable/access/AccessControlUpgradeable.sol:260"
},
{
"label": "childTokenAllowances",
"offset": 0,
"slot": "204",
"type": "t_mapping(t_address,t_mapping(t_bool,t_uint256))",
"contract": "ForkonomicToken",
"src": "contracts/ForkonomicToken.sol:23"
}
],
"types": {
"t_address": {
"label": "address",
"numberOfBytes": "20"
},
"t_array(t_uint256)45_storage": {
"label": "uint256[45]",
"numberOfBytes": "1440"
},
"t_array(t_uint256)49_storage": {
"label": "uint256[49]",
"numberOfBytes": "1568"
},
"t_array(t_uint256)50_storage": {
"label": "uint256[50]",
"numberOfBytes": "1600"
},
"t_bool": {
"label": "bool",
"numberOfBytes": "1"
},
"t_bytes32": {
"label": "bytes32",
"numberOfBytes": "32"
},
"t_mapping(t_address,t_bool)": {
"label": "mapping(address => bool)",
"numberOfBytes": "32"
},
"t_mapping(t_address,t_mapping(t_address,t_uint256))": {
"label": "mapping(address => mapping(address => uint256))",
"numberOfBytes": "32"
},
"t_mapping(t_address,t_mapping(t_bool,t_uint256))": {
"label": "mapping(address => mapping(bool => uint256))",
"numberOfBytes": "32"
},
"t_mapping(t_address,t_uint256)": {
"label": "mapping(address => uint256)",
"numberOfBytes": "32"
},
"t_mapping(t_bool,t_uint256)": {
"label": "mapping(bool => uint256)",
"numberOfBytes": "32"
},
"t_mapping(t_bytes32,t_struct(RoleData)6951_storage)": {
"label": "mapping(bytes32 => struct AccessControlUpgradeable.RoleData)",
"numberOfBytes": "32"
},
"t_mapping(t_uint256,t_address)": {
"label": "mapping(uint256 => address)",
"numberOfBytes": "32"
},
"t_string_storage": {
"label": "string",
"numberOfBytes": "32"
},
"t_struct(RoleData)6951_storage": {
"label": "struct AccessControlUpgradeable.RoleData",
"members": [
{
"label": "members",
"type": "t_mapping(t_address,t_bool)",
"offset": 0,
"slot": "0"
},
{
"label": "adminRole",
"type": "t_bytes32",
"offset": 0,
"slot": "1"
}
],
"numberOfBytes": "64"
},
"t_uint256": {
"label": "uint256",
"numberOfBytes": "32"
},
"t_uint8": {
"label": "uint8",
"numberOfBytes": "1"
}
},
"namespaces": {}
}
}
}
}
Loading