Commit 63f2cdd4 authored by Karl Floersch's avatar Karl Floersch Committed by GitHub

feat: update mainnet deployment (#838)

* Update mainnet deployment

* Remove old unused contracts

* chore: regenerate readme

* Change : to - in deploy files
Co-authored-by: default avatarGeorgios Konstantopoulos <me@gakonst.com>
Co-authored-by: default avatarMark Tyneway <mark.tyneway@gmail.com>
Co-authored-by: default avatarplatocrat <37757724+platocrat@users.noreply.github.com>
parent e88e85d1
......@@ -31,25 +31,48 @@ Network : __mainnet (chain id: 1)__
|Contract|Address|
|--|--|
|Lib_AddressManager|[0xd3EeD86464Ff13B4BFD81a3bB1e753b7ceBA3A39](https://etherscan.io/address/0xd3EeD86464Ff13B4BFD81a3bB1e753b7ceBA3A39)|
|OVM_CanonicalTransactionChain|[0x405B4008Da75C48F4E54AA39607378967Ae62338](https://etherscan.io/address/0x405B4008Da75C48F4E54AA39607378967Ae62338)|
|OVM_ChainStorageContainer-CTC-batches|[0x65E921eE201E4a0881FF84ea462baB744bB2fbf0](https://etherscan.io/address/0x65E921eE201E4a0881FF84ea462baB744bB2fbf0)|
|OVM_ChainStorageContainer-CTC-queue|[0x03004C447722d207B0355529A6d0dA0696BF6ec6](https://etherscan.io/address/0x03004C447722d207B0355529A6d0dA0696BF6ec6)|
|OVM_ChainStorageContainer-SCC-batches|[0x6B7Fce2C4FD1934a2d251F8b0930ac82DdDAD804](https://etherscan.io/address/0x6B7Fce2C4FD1934a2d251F8b0930ac82DdDAD804)|
|OVM_ExecutionManager|[0xEd93C5c21c502bB52b4D77240fA9a5d38472304d](https://etherscan.io/address/0xEd93C5c21c502bB52b4D77240fA9a5d38472304d)|
|OVM_FraudVerifier|[0xF7C64A47A557D2944798801C08771e15455c56c4](https://etherscan.io/address/0xF7C64A47A557D2944798801C08771e15455c56c4)|
|OVM_L1CrossDomainMessenger|[0xeec700E5a793e28B068537c7dd95d632B603440A](https://etherscan.io/address/0xeec700E5a793e28B068537c7dd95d632B603440A)|
|OVM_L1ETHGateway|[0x384bC62a4bb9aE617c8dD0eC351d7780444EFDc0](https://etherscan.io/address/0x384bC62a4bb9aE617c8dD0eC351d7780444EFDc0)|
|OVM_L1MultiMessageRelayer|[0x22adc8A1152B090721E253Ee88CC12a15bcF9222](https://etherscan.io/address/0x22adc8A1152B090721E253Ee88CC12a15bcF9222)|
|OVM_SafetyChecker|[0x4667c625b36Df62e393a9483BCfB2F00cA0708D1](https://etherscan.io/address/0x4667c625b36Df62e393a9483BCfB2F00cA0708D1)|
|OVM_StateCommitmentChain|[0x1D0C46671E0696a4Ba800032D5195d5b0f8c60A3](https://etherscan.io/address/0x1D0C46671E0696a4Ba800032D5195d5b0f8c60A3)|
|OVM_StateManagerFactory|[0xc43AB03567A18CC75CD4B75ABDBEb6DfC2192fF3](https://etherscan.io/address/0xc43AB03567A18CC75CD4B75ABDBEb6DfC2192fF3)|
|OVM_StateTransitionerFactory|[0x8FA5bfeeb7786D2a241527E8aE8cA1d7511A0E10](https://etherscan.io/address/0x8FA5bfeeb7786D2a241527E8aE8cA1d7511A0E10)|
|Proxy__OVM_L1CrossDomainMessenger|[0xD1EC7d40CCd01EB7A305b94cBa8AB6D17f6a9eFE](https://etherscan.io/address/0xD1EC7d40CCd01EB7A305b94cBa8AB6D17f6a9eFE)|
|Proxy__OVM_L1ETHGateway|[0xF20C38fCdDF0C790319Fd7431d17ea0c2bC9959c](https://etherscan.io/address/0xF20C38fCdDF0C790319Fd7431d17ea0c2bC9959c)|
|mockOVM_BondManager|[0x99EDa8472E93Aa28E5470eEDEc6e32081E14DaFC](https://etherscan.io/address/0x99EDa8472E93Aa28E5470eEDEc6e32081E14DaFC)|
|Lib_AddressManager|[0x668E5b997b9aE88a56cd40409119d4Db9e6d752E](https://etherscan.io/address/0x668E5b997b9aE88a56cd40409119d4Db9e6d752E)|
|OVM_CanonicalTransactionChain|[0xa88e220c7FC7F0D845D2624a5dF1DfD6874B9a44](https://etherscan.io/address/0xa88e220c7FC7F0D845D2624a5dF1DfD6874B9a44)|
|OVM_ChainStorageContainer-CTC-batches|[0x28157e8a8E6d22A367c63Ad61dD56d9E6bDCE905](https://etherscan.io/address/0x28157e8a8E6d22A367c63Ad61dD56d9E6bDCE905)|
|OVM_ChainStorageContainer-CTC-queue|[0xD68670eD8800c856613FD3e4C55539A2Ff53cCb3](https://etherscan.io/address/0xD68670eD8800c856613FD3e4C55539A2Ff53cCb3)|
|OVM_ChainStorageContainer-SCC-batches|[0x7B8af5f008A7C5eFD319e68Fd5C9A68008519Caf](https://etherscan.io/address/0x7B8af5f008A7C5eFD319e68Fd5C9A68008519Caf)|
|OVM_ExecutionManager|[0x3f5FA555c434b49D946042955013966Fd108DaC3](https://etherscan.io/address/0x3f5FA555c434b49D946042955013966Fd108DaC3)|
|OVM_FraudVerifier|[0x169CC2f69Cc16da17B71Df2dce6161ef57991bB9](https://etherscan.io/address/0x169CC2f69Cc16da17B71Df2dce6161ef57991bB9)|
|OVM_L1CrossDomainMessenger|[0x598F2b19e983910529affAb7D219724a019339CC](https://etherscan.io/address/0x598F2b19e983910529affAb7D219724a019339CC)|
|OVM_L1ETHGateway|[0x40c9067ec8087EcF101FC10d2673636955b81A32](https://etherscan.io/address/0x40c9067ec8087EcF101FC10d2673636955b81A32)|
|OVM_L1MultiMessageRelayer|[0xc34F5B7279A9276A9D02491c59630fa725B7c36B](https://etherscan.io/address/0xc34F5B7279A9276A9D02491c59630fa725B7c36B)|
|OVM_SafetyChecker|[0xD87eFbBb82f1B7d25469641ee2E0E513f144394C](https://etherscan.io/address/0xD87eFbBb82f1B7d25469641ee2E0E513f144394C)|
|OVM_StateCommitmentChain|[0x6786EB419547a4902d285F70c6acDbC9AefAdB6F](https://etherscan.io/address/0x6786EB419547a4902d285F70c6acDbC9AefAdB6F)|
|OVM_StateManagerFactory|[0xA4C213C1E2bF5594baB0BCdF071ed5B0E946b19e](https://etherscan.io/address/0xA4C213C1E2bF5594baB0BCdF071ed5B0E946b19e)|
|OVM_StateTransitionerFactory|[0xAe4ef5e45C42dA513d2B48E184B64A05c18d8154](https://etherscan.io/address/0xAe4ef5e45C42dA513d2B48E184B64A05c18d8154)|
|Proxy__OVM_L1CrossDomainMessenger|[0x902e5fF5A99C4eC1C21bbab089fdabE32EF0A5DF](https://etherscan.io/address/0x902e5fF5A99C4eC1C21bbab089fdabE32EF0A5DF)|
|Proxy__OVM_L1ETHGateway|[0xe681F80966a8b1fFadECf8068bD6F99034791c95](https://etherscan.io/address/0xe681F80966a8b1fFadECf8068bD6F99034791c95)|
|mockOVM_BondManager|[0x90c5F8d045bBcCc99d907f30E8707F06D95d065b](https://etherscan.io/address/0x90c5F8d045bBcCc99d907f30E8707F06D95d065b)|
---
## KOVAN-V3
Network : __kovan (chain id: 42)__
|Contract|Address|
|--|--|
|Lib_AddressManager|[0xd56F695e73286ac252A37593DD4E7c14270eC1Df](https://kovan.etherscan.io/address/0xd56F695e73286ac252A37593DD4E7c14270eC1Df)|
|OVM_CanonicalTransactionChain|[0x895eabB95D684c15fa46Dc00a6b7557450083DEF](https://kovan.etherscan.io/address/0x895eabB95D684c15fa46Dc00a6b7557450083DEF)|
|OVM_ChainStorageContainer-CTC-batches|[0xeb335a8A5e8bA008cF7Cb02D5C3432f4fDB576da](https://kovan.etherscan.io/address/0xeb335a8A5e8bA008cF7Cb02D5C3432f4fDB576da)|
|OVM_ChainStorageContainer-CTC-queue|[0x207fa9Aa7Dee9AA790A8DF64778D3E3B6273BC90](https://kovan.etherscan.io/address/0x207fa9Aa7Dee9AA790A8DF64778D3E3B6273BC90)|
|OVM_ChainStorageContainer-SCC-batches|[0xFE1CE27173676A6850ECF4e0536D7C468A4dAfa0](https://kovan.etherscan.io/address/0xFE1CE27173676A6850ECF4e0536D7C468A4dAfa0)|
|OVM_ExecutionManager|[0xa2EB1961183a04157fF707Fa2Be2249e149c8FAB](https://kovan.etherscan.io/address/0xa2EB1961183a04157fF707Fa2Be2249e149c8FAB)|
|OVM_FraudVerifier|[0x4B2F74938Ddb8742C33b46aD1a402c85e9dABC44](https://kovan.etherscan.io/address/0x4B2F74938Ddb8742C33b46aD1a402c85e9dABC44)|
|OVM_L1CrossDomainMessenger|[0xa9D9045E4A753c856Fc0053369E780f23559E0A1](https://kovan.etherscan.io/address/0xa9D9045E4A753c856Fc0053369E780f23559E0A1)|
|OVM_L1ETHGateway|[0x25bb69ee5665536Ce6aeb51094F0bed9e4DACc30](https://kovan.etherscan.io/address/0x25bb69ee5665536Ce6aeb51094F0bed9e4DACc30)|
|OVM_L1MultiMessageRelayer|[0x942b1B1CaF9e7654318CbfCfD1bca6727C716638](https://kovan.etherscan.io/address/0x942b1B1CaF9e7654318CbfCfD1bca6727C716638)|
|OVM_SafetyChecker|[0xf0FaB0ce35a6d3F82b0B42f09A2734065908dB6a](https://kovan.etherscan.io/address/0xf0FaB0ce35a6d3F82b0B42f09A2734065908dB6a)|
|OVM_StateCommitmentChain|[0xdB1367bB36C34618778D492725C3eD11B508aC54](https://kovan.etherscan.io/address/0xdB1367bB36C34618778D492725C3eD11B508aC54)|
|OVM_StateManagerFactory|[0x3b96673C9e24D362501e87B239F60543e20beD50](https://kovan.etherscan.io/address/0x3b96673C9e24D362501e87B239F60543e20beD50)|
|OVM_StateTransitionerFactory|[0xd6eDb16a89A2EE4484fa8fdCDb11B8B5633c3687](https://kovan.etherscan.io/address/0xd6eDb16a89A2EE4484fa8fdCDb11B8B5633c3687)|
|Proxy__OVM_L1CrossDomainMessenger|[0x78b88FD62FBdBf67b9C5C6528CF84E9d30BB28e0](https://kovan.etherscan.io/address/0x78b88FD62FBdBf67b9C5C6528CF84E9d30BB28e0)|
|Proxy__OVM_L1ETHGateway|[0xB191d67F69e823445cD59e5A88953a82be73b9C6](https://kovan.etherscan.io/address/0xB191d67F69e823445cD59e5A88953a82be73b9C6)|
|mockOVM_BondManager|[0x8ECe272C9f83041bcb1Cd57AC49Ca6494776bE01](https://kovan.etherscan.io/address/0x8ECe272C9f83041bcb1Cd57AC49Ca6494776bE01)|
---
## KOVAN
Network : __kovan (chain id: 42)__
......@@ -73,3 +96,28 @@ Network : __kovan (chain id: 42)__
|Proxy__OVM_L1CrossDomainMessenger|[0x48062eD9b6488EC41c4CfbF2f568D7773819d8C9](https://kovan.etherscan.io/address/0x48062eD9b6488EC41c4CfbF2f568D7773819d8C9)|
|Proxy__OVM_L1ETHGateway|[0xf3902e50dA095bD2e954AB320E8eafDA6152dFDa](https://kovan.etherscan.io/address/0xf3902e50dA095bD2e954AB320E8eafDA6152dFDa)|
|mockOVM_BondManager|[0x77e244ec49014cFb9c4572453568eCC3AbB70A2d](https://kovan.etherscan.io/address/0x77e244ec49014cFb9c4572453568eCC3AbB70A2d)|
---
## GOERLI-V3
Network : __goerli (chain id: 5)__
|Contract|Address|
|--|--|
|Lib_AddressManager|[0xE3d08F0D900A2D53cB794cf82d7127764BcC3092](https://goerli.etherscan.io/address/0xE3d08F0D900A2D53cB794cf82d7127764BcC3092)|
|OVM_CanonicalTransactionChain|[0x266534680e632Ce9425d8E5a991C43B3531C7818](https://goerli.etherscan.io/address/0x266534680e632Ce9425d8E5a991C43B3531C7818)|
|OVM_ChainStorageContainer-CTC-batches|[0x7b439CD647b76F45252858C19093a53b4c5FD4B4](https://goerli.etherscan.io/address/0x7b439CD647b76F45252858C19093a53b4c5FD4B4)|
|OVM_ChainStorageContainer-CTC-queue|[0xeD5fF8cFFba09fa5fF3104a63bA321733c4553d9](https://goerli.etherscan.io/address/0xeD5fF8cFFba09fa5fF3104a63bA321733c4553d9)|
|OVM_ChainStorageContainer-SCC-batches|[0x2A622E327D7A204b39355202d41BD9B752C8df54](https://goerli.etherscan.io/address/0x2A622E327D7A204b39355202d41BD9B752C8df54)|
|OVM_ExecutionManager|[0x45B459295d6b08D7dA3B9daae541D5F75E1CF818](https://goerli.etherscan.io/address/0x45B459295d6b08D7dA3B9daae541D5F75E1CF818)|
|OVM_FraudVerifier|[0xfA590cE7fE1d80D4b286e23f3f6e9f9357D6A90b](https://goerli.etherscan.io/address/0xfA590cE7fE1d80D4b286e23f3f6e9f9357D6A90b)|
|OVM_L1CrossDomainMessenger|[0x27BdfF69C72d29493bfD2152DbE28657f8Ddd5df](https://goerli.etherscan.io/address/0x27BdfF69C72d29493bfD2152DbE28657f8Ddd5df)|
|OVM_L1ETHGateway|[0x746E840b94cC75921D1cb620b83CFd0C658B2852](https://goerli.etherscan.io/address/0x746E840b94cC75921D1cb620b83CFd0C658B2852)|
|OVM_L1MultiMessageRelayer|[0x737557d97f7f2ccb0263C4b55f0D735D52c2D385](https://goerli.etherscan.io/address/0x737557d97f7f2ccb0263C4b55f0D735D52c2D385)|
|OVM_SafetyChecker|[0x71D4ea896C9a2D4a973CC5c7E347B6707691ECa0](https://goerli.etherscan.io/address/0x71D4ea896C9a2D4a973CC5c7E347B6707691ECa0)|
|OVM_StateCommitmentChain|[0x5c3e321947C99698027108351ee736823Bd157D8](https://goerli.etherscan.io/address/0x5c3e321947C99698027108351ee736823Bd157D8)|
|OVM_StateManagerFactory|[0x8E63CD1CfDBe5d34a7a91B97E0A2AeA23D0e585D](https://goerli.etherscan.io/address/0x8E63CD1CfDBe5d34a7a91B97E0A2AeA23D0e585D)|
|OVM_StateTransitionerFactory|[0x543021950Af9250443EEdc681755e0bdBd3Fc81d](https://goerli.etherscan.io/address/0x543021950Af9250443EEdc681755e0bdBd3Fc81d)|
|Proxy__OVM_L1CrossDomainMessenger|[0xFec83764acDeEc2ac338d4cc1f12bBE3cCDf551E](https://goerli.etherscan.io/address/0xFec83764acDeEc2ac338d4cc1f12bBE3cCDf551E)|
|Proxy__OVM_L1ETHGateway|[0xA721CF3e39E5cB4CfEEc0e32EE05B3D05AA9aE39](https://goerli.etherscan.io/address/0xA721CF3e39E5cB4CfEEc0e32EE05B3D05AA9aE39)|
|mockOVM_BondManager|[0x35a7735F9f517d071d5cFf89D11Ab4488bc5Df8C](https://goerli.etherscan.io/address/0x35a7735F9f517d071d5cFf89D11Ab4488bc5Df8C)|
---
{
"address": "0xd3EeD86464Ff13B4BFD81a3bB1e753b7ceBA3A39",
"address": "0x668E5b997b9aE88a56cd40409119d4Db9e6d752E",
"abi": [
{
"anonymous": false,
......@@ -100,7 +100,7 @@
"inputs": [
{
"internalType": "address",
"name": "_newOwner",
"name": "newOwner",
"type": "address"
}
],
......@@ -110,65 +110,96 @@
"type": "function"
}
],
"transactionHash": "0x3f0530a8f329bf40345ebeb476efaf823ec5c89f3d1cc41f494e6d218b2ef08f",
"transactionHash": "0xb7ffb05e540cf02a164869cca8b6f00f5d645148eac465644f27a6d80977f821",
"receipt": {
"to": null,
"from": "0x77C4c8f491e5ff22a2C0E18b005c3BA0Fe36c1Bc",
"contractAddress": "0xd3EeD86464Ff13B4BFD81a3bB1e753b7ceBA3A39",
"transactionIndex": 197,
"gasUsed": "403788",
"logsBloom": "0x00000000000000000000000000000000000000000000000000800000000000000000000080000000000000000000000000000000000000000000008000000000001000000000000000000000000000000001000000000000000000000000000000000000020000000000000000000800000000000000000000000000010000400000000000000000000000000008000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000002000000000000000000000000000000000000000020000000000000000000000000000000000000000000000000000000000000000000",
"blockHash": "0x9d66eda604e8274e6adb8b371ab52f1874b2402c2d6fb7d91ce0ace69b8f801c",
"transactionHash": "0x3f0530a8f329bf40345ebeb476efaf823ec5c89f3d1cc41f494e6d218b2ef08f",
"from": "0xd033f09cB85621F98F7A84C64dB381ac16Eff818",
"contractAddress": "0x668E5b997b9aE88a56cd40409119d4Db9e6d752E",
"transactionIndex": 227,
"gasUsed": "427277",
"logsBloom": "0x00000000000000000000000000000040000000000000000000800000000000000000000000000000000000000000000000000000000200000000000000000000000000000000000000000000000000000001000000000000000000000000000000000000020000200000000000000800000000000000000000000000000020400000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000060000000000000000000000000000000000001000000000000000000000000000000",
"blockHash": "0x53e80ac59e7178fc903374bca1e8fbb3c212cd56e6a4763e8cf6a564cf461457",
"transactionHash": "0xb7ffb05e540cf02a164869cca8b6f00f5d645148eac465644f27a6d80977f821",
"logs": [
{
"transactionIndex": 197,
"blockNumber": 12207737,
"transactionHash": "0x3f0530a8f329bf40345ebeb476efaf823ec5c89f3d1cc41f494e6d218b2ef08f",
"address": "0xd3EeD86464Ff13B4BFD81a3bB1e753b7ceBA3A39",
"transactionIndex": 227,
"blockNumber": 12410727,
"transactionHash": "0xb7ffb05e540cf02a164869cca8b6f00f5d645148eac465644f27a6d80977f821",
"address": "0x668E5b997b9aE88a56cd40409119d4Db9e6d752E",
"topics": [
"0x8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0",
"0x0000000000000000000000000000000000000000000000000000000000000000",
"0x00000000000000000000000077c4c8f491e5ff22a2c0e18b005c3ba0fe36c1bc"
"0x000000000000000000000000d033f09cb85621f98f7a84c64db381ac16eff818"
],
"data": "0x",
"logIndex": 104,
"blockHash": "0x9d66eda604e8274e6adb8b371ab52f1874b2402c2d6fb7d91ce0ace69b8f801c"
"logIndex": 58,
"blockHash": "0x53e80ac59e7178fc903374bca1e8fbb3c212cd56e6a4763e8cf6a564cf461457"
}
],
"blockNumber": 12207737,
"cumulativeGasUsed": "9721212",
"blockNumber": 12410727,
"cumulativeGasUsed": "6359487",
"status": 1,
"byzantium": true
},
"args": [],
"solcInputHash": "43ee6bb8ef92595aa6d0e22a6c464dff",
"metadata": "{\"compiler\":{\"version\":\"0.7.6+commit.7338295f\"},\"language\":\"Solidity\",\"output\":{\"abi\":[{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"string\",\"name\":\"_name\",\"type\":\"string\"},{\"indexed\":false,\"internalType\":\"address\",\"name\":\"_newAddress\",\"type\":\"address\"}],\"name\":\"AddressSet\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"previousOwner\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"newOwner\",\"type\":\"address\"}],\"name\":\"OwnershipTransferred\",\"type\":\"event\"},{\"inputs\":[{\"internalType\":\"string\",\"name\":\"_name\",\"type\":\"string\"}],\"name\":\"getAddress\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"owner\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"renounceOwnership\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"string\",\"name\":\"_name\",\"type\":\"string\"},{\"internalType\":\"address\",\"name\":\"_address\",\"type\":\"address\"}],\"name\":\"setAddress\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_newOwner\",\"type\":\"address\"}],\"name\":\"transferOwnership\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"}],\"devdoc\":{\"kind\":\"dev\",\"methods\":{},\"title\":\"Lib_AddressManager\",\"version\":1},\"userdoc\":{\"kind\":\"user\",\"methods\":{},\"version\":1}},\"settings\":{\"compilationTarget\":{\"contracts/optimistic-ethereum/libraries/resolver/Lib_AddressManager.sol\":\"Lib_AddressManager\"},\"evmVersion\":\"istanbul\",\"libraries\":{},\"metadata\":{\"bytecodeHash\":\"none\",\"useLiteralContent\":true},\"optimizer\":{\"enabled\":true,\"runs\":200},\"remappings\":[]},\"sources\":{\"contracts/optimistic-ethereum/libraries/resolver/Lib_AddressManager.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\npragma solidity >0.5.0 <0.8.0;\\n\\n/* Contract Imports */\\nimport { Ownable } from \\\"./Lib_Ownable.sol\\\";\\n\\n/**\\n * @title Lib_AddressManager\\n */\\ncontract Lib_AddressManager is Ownable {\\n\\n /**********\\n * Events *\\n **********/\\n\\n event AddressSet(\\n string _name,\\n address _newAddress\\n );\\n\\n /*******************************************\\n * Contract Variables: Internal Accounting *\\n *******************************************/\\n\\n mapping (bytes32 => address) private addresses;\\n\\n\\n /********************\\n * Public Functions *\\n ********************/\\n\\n function setAddress(\\n string memory _name,\\n address _address\\n )\\n public\\n onlyOwner\\n {\\n emit AddressSet(_name, _address);\\n addresses[_getNameHash(_name)] = _address;\\n }\\n\\n function getAddress(\\n string memory _name\\n )\\n public\\n view\\n returns (address)\\n {\\n return addresses[_getNameHash(_name)];\\n }\\n\\n\\n /**********************\\n * Internal Functions *\\n **********************/\\n\\n function _getNameHash(\\n string memory _name\\n )\\n internal\\n pure\\n returns (\\n bytes32 _hash\\n )\\n {\\n return keccak256(abi.encodePacked(_name));\\n }\\n}\\n\",\"keccak256\":\"0x3a490595cc21ff170e4027843093670ff845d5972481fbfb956b722ea564bb06\",\"license\":\"MIT\"},\"contracts/optimistic-ethereum/libraries/resolver/Lib_Ownable.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\npragma solidity >0.5.0 <0.8.0;\\n\\n/**\\n * @title Ownable\\n * @dev Adapted from https://github.com/OpenZeppelin/openzeppelin-contracts/blob/master/contracts/access/Ownable.sol\\n */\\nabstract contract Ownable {\\n\\n /*************\\n * Variables *\\n *************/\\n\\n address public owner;\\n\\n\\n /**********\\n * Events *\\n **********/\\n\\n event OwnershipTransferred(\\n address indexed previousOwner,\\n address indexed newOwner\\n );\\n\\n\\n /***************\\n * Constructor *\\n ***************/\\n\\n constructor() {\\n owner = msg.sender;\\n emit OwnershipTransferred(address(0), owner);\\n }\\n\\n\\n /**********************\\n * Function Modifiers *\\n **********************/\\n\\n modifier onlyOwner() {\\n require(\\n owner == msg.sender,\\n \\\"Ownable: caller is not the owner\\\"\\n );\\n _;\\n }\\n\\n\\n /********************\\n * Public Functions *\\n ********************/\\n\\n function renounceOwnership()\\n public\\n virtual\\n onlyOwner\\n {\\n emit OwnershipTransferred(owner, address(0));\\n owner = address(0);\\n }\\n\\n function transferOwnership(address _newOwner)\\n public\\n virtual\\n onlyOwner\\n {\\n require(\\n _newOwner != address(0),\\n \\\"Ownable: new owner cannot be the zero address\\\"\\n );\\n\\n emit OwnershipTransferred(owner, _newOwner);\\n owner = _newOwner;\\n }\\n}\\n\",\"keccak256\":\"0xd9dfd9264e5b5fedd53a5b10fdf179c3f367614b0fe69179bce4e45119f5b739\",\"license\":\"MIT\"}},\"version\":1}",
"bytecode": "0x608060405234801561001057600080fd5b50600080546001600160a01b03191633178082556040516001600160a01b039190911691907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0908290a36105eb806100696000396000f3fe608060405234801561001057600080fd5b50600436106100575760003560e01c8063715018a61461005c5780638da5cb5b146100665780639b2ea4bd1461008a578063bf40fac11461013b578063f2fde38b146101e1575b600080fd5b610064610207565b005b61006e6102b0565b604080516001600160a01b039092168252519081900360200190f35b610064600480360360408110156100a057600080fd5b8101906020810181356401000000008111156100bb57600080fd5b8201836020820111156100cd57600080fd5b803590602001918460018302840111640100000000831117156100ef57600080fd5b91908080601f016020809104026020016040519081016040528093929190818152602001838380828437600092019190915250929550505090356001600160a01b031691506102bf9050565b61006e6004803603602081101561015157600080fd5b81019060208101813564010000000081111561016c57600080fd5b82018360208201111561017e57600080fd5b803590602001918460018302840111640100000000831117156101a057600080fd5b91908080601f01602080910402602001604051908101604052809392919081815260200183838082843760009201919091525092955061040c945050505050565b610064600480360360208110156101f757600080fd5b50356001600160a01b031661043b565b6000546001600160a01b03163314610266576040805162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604482015290519081900360640190fd5b600080546040516001600160a01b03909116907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0908390a3600080546001600160a01b0319169055565b6000546001600160a01b031681565b6000546001600160a01b0316331461031e576040805162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604482015290519081900360640190fd5b7f188466739ff00cc68bfb2367d23ae4b855264264fe1624caa8884399af23454c82826040518080602001836001600160a01b03168152602001828103825284818151815260200191508051906020019080838360005b8381101561038d578181015183820152602001610375565b50505050905090810190601f1680156103ba5780820380516001836020036101000a031916815260200191505b50935050505060405180910390a180600160006103d68561053a565b815260200190815260200160002060006101000a8154816001600160a01b0302191690836001600160a01b031602179055505050565b60006001600061041b8461053a565b81526020810191909152604001600020546001600160a01b031692915050565b6000546001600160a01b0316331461049a576040805162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604482015290519081900360640190fd5b6001600160a01b0381166104df5760405162461bcd60e51b815260040180806020018281038252602d8152602001806105b2602d913960400191505060405180910390fd5b600080546040516001600160a01b03808516939216917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e091a3600080546001600160a01b0319166001600160a01b0392909216919091179055565b6000816040516020018082805190602001908083835b6020831061056f5780518252601f199092019160209182019101610550565b6001836020036101000a03801982511681845116808217855250505050505090500191505060405160208183030381529060405280519060200120905091905056fe4f776e61626c653a206e6577206f776e65722063616e6e6f7420626520746865207a65726f2061646472657373a164736f6c6343000706000a",
"deployedBytecode": "0x608060405234801561001057600080fd5b50600436106100575760003560e01c8063715018a61461005c5780638da5cb5b146100665780639b2ea4bd1461008a578063bf40fac11461013b578063f2fde38b146101e1575b600080fd5b610064610207565b005b61006e6102b0565b604080516001600160a01b039092168252519081900360200190f35b610064600480360360408110156100a057600080fd5b8101906020810181356401000000008111156100bb57600080fd5b8201836020820111156100cd57600080fd5b803590602001918460018302840111640100000000831117156100ef57600080fd5b91908080601f016020809104026020016040519081016040528093929190818152602001838380828437600092019190915250929550505090356001600160a01b031691506102bf9050565b61006e6004803603602081101561015157600080fd5b81019060208101813564010000000081111561016c57600080fd5b82018360208201111561017e57600080fd5b803590602001918460018302840111640100000000831117156101a057600080fd5b91908080601f01602080910402602001604051908101604052809392919081815260200183838082843760009201919091525092955061040c945050505050565b610064600480360360208110156101f757600080fd5b50356001600160a01b031661043b565b6000546001600160a01b03163314610266576040805162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604482015290519081900360640190fd5b600080546040516001600160a01b03909116907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0908390a3600080546001600160a01b0319169055565b6000546001600160a01b031681565b6000546001600160a01b0316331461031e576040805162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604482015290519081900360640190fd5b7f188466739ff00cc68bfb2367d23ae4b855264264fe1624caa8884399af23454c82826040518080602001836001600160a01b03168152602001828103825284818151815260200191508051906020019080838360005b8381101561038d578181015183820152602001610375565b50505050905090810190601f1680156103ba5780820380516001836020036101000a031916815260200191505b50935050505060405180910390a180600160006103d68561053a565b815260200190815260200160002060006101000a8154816001600160a01b0302191690836001600160a01b031602179055505050565b60006001600061041b8461053a565b81526020810191909152604001600020546001600160a01b031692915050565b6000546001600160a01b0316331461049a576040805162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604482015290519081900360640190fd5b6001600160a01b0381166104df5760405162461bcd60e51b815260040180806020018281038252602d8152602001806105b2602d913960400191505060405180910390fd5b600080546040516001600160a01b03808516939216917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e091a3600080546001600160a01b0319166001600160a01b0392909216919091179055565b6000816040516020018082805190602001908083835b6020831061056f5780518252601f199092019160209182019101610550565b6001836020036101000a03801982511681845116808217855250505050505090500191505060405160208183030381529060405280519060200120905091905056fe4f776e61626c653a206e6577206f776e65722063616e6e6f7420626520746865207a65726f2061646472657373a164736f6c6343000706000a",
"solcInputHash": "f2bdab652d5102f5f11e78dae866798d",
"metadata": "{\"compiler\":{\"version\":\"0.7.6+commit.7338295f\"},\"language\":\"Solidity\",\"output\":{\"abi\":[{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"string\",\"name\":\"_name\",\"type\":\"string\"},{\"indexed\":false,\"internalType\":\"address\",\"name\":\"_newAddress\",\"type\":\"address\"}],\"name\":\"AddressSet\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"previousOwner\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"newOwner\",\"type\":\"address\"}],\"name\":\"OwnershipTransferred\",\"type\":\"event\"},{\"inputs\":[{\"internalType\":\"string\",\"name\":\"_name\",\"type\":\"string\"}],\"name\":\"getAddress\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"owner\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"renounceOwnership\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"string\",\"name\":\"_name\",\"type\":\"string\"},{\"internalType\":\"address\",\"name\":\"_address\",\"type\":\"address\"}],\"name\":\"setAddress\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"newOwner\",\"type\":\"address\"}],\"name\":\"transferOwnership\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"}],\"devdoc\":{\"kind\":\"dev\",\"methods\":{\"getAddress(string)\":{\"params\":{\"_name\":\"Name to retrieve an address for.\"},\"returns\":{\"_0\":\"Address associated with the given name.\"}},\"owner()\":{\"details\":\"Returns the address of the current owner.\"},\"renounceOwnership()\":{\"details\":\"Leaves the contract without owner. It will not be possible to call `onlyOwner` functions anymore. Can only be called by the current owner. NOTE: Renouncing ownership will leave the contract without an owner, thereby removing any functionality that is only available to the owner.\"},\"setAddress(string,address)\":{\"params\":{\"_address\":\"Address to associate with the name.\",\"_name\":\"String name to associate an address with.\"}},\"transferOwnership(address)\":{\"details\":\"Transfers ownership of the contract to a new account (`newOwner`). Can only be called by the current owner.\"}},\"title\":\"Lib_AddressManager\",\"version\":1},\"userdoc\":{\"kind\":\"user\",\"methods\":{\"getAddress(string)\":{\"notice\":\"Retrieves the address associated with a given name.\"},\"setAddress(string,address)\":{\"notice\":\"Changes the address associated with a particular name.\"}},\"version\":1}},\"settings\":{\"compilationTarget\":{\"contracts/optimistic-ethereum/libraries/resolver/Lib_AddressManager.sol\":\"Lib_AddressManager\"},\"evmVersion\":\"istanbul\",\"libraries\":{},\"metadata\":{\"bytecodeHash\":\"ipfs\",\"useLiteralContent\":true},\"optimizer\":{\"enabled\":true,\"runs\":200},\"remappings\":[]},\"sources\":{\"@openzeppelin/contracts/access/Ownable.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity >=0.6.0 <0.8.0;\\n\\nimport \\\"../utils/Context.sol\\\";\\n/**\\n * @dev Contract module which provides a basic access control mechanism, where\\n * there is an account (an owner) that can be granted exclusive access to\\n * specific functions.\\n *\\n * By default, the owner account will be the one that deploys the contract. This\\n * can later be changed with {transferOwnership}.\\n *\\n * This module is used through inheritance. It will make available the modifier\\n * `onlyOwner`, which can be applied to your functions to restrict their use to\\n * the owner.\\n */\\nabstract contract Ownable is Context {\\n address private _owner;\\n\\n event OwnershipTransferred(address indexed previousOwner, address indexed newOwner);\\n\\n /**\\n * @dev Initializes the contract setting the deployer as the initial owner.\\n */\\n constructor () internal {\\n address msgSender = _msgSender();\\n _owner = msgSender;\\n emit OwnershipTransferred(address(0), msgSender);\\n }\\n\\n /**\\n * @dev Returns the address of the current owner.\\n */\\n function owner() public view virtual returns (address) {\\n return _owner;\\n }\\n\\n /**\\n * @dev Throws if called by any account other than the owner.\\n */\\n modifier onlyOwner() {\\n require(owner() == _msgSender(), \\\"Ownable: caller is not the owner\\\");\\n _;\\n }\\n\\n /**\\n * @dev Leaves the contract without owner. It will not be possible to call\\n * `onlyOwner` functions anymore. Can only be called by the current owner.\\n *\\n * NOTE: Renouncing ownership will leave the contract without an owner,\\n * thereby removing any functionality that is only available to the owner.\\n */\\n function renounceOwnership() public virtual onlyOwner {\\n emit OwnershipTransferred(_owner, address(0));\\n _owner = address(0);\\n }\\n\\n /**\\n * @dev Transfers ownership of the contract to a new account (`newOwner`).\\n * Can only be called by the current owner.\\n */\\n function transferOwnership(address newOwner) public virtual onlyOwner {\\n require(newOwner != address(0), \\\"Ownable: new owner is the zero address\\\");\\n emit OwnershipTransferred(_owner, newOwner);\\n _owner = newOwner;\\n }\\n}\\n\",\"keccak256\":\"0x15e2d5bd4c28a88548074c54d220e8086f638a71ed07e6b3ba5a70066fcf458d\",\"license\":\"MIT\"},\"@openzeppelin/contracts/utils/Context.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity >=0.6.0 <0.8.0;\\n\\n/*\\n * @dev Provides information about the current execution context, including the\\n * sender of the transaction and its data. While these are generally available\\n * via msg.sender and msg.data, they should not be accessed in such a direct\\n * manner, since when dealing with GSN meta-transactions the account sending and\\n * paying for execution may not be the actual sender (as far as an application\\n * is concerned).\\n *\\n * This contract is only required for intermediate, library-like contracts.\\n */\\nabstract contract Context {\\n function _msgSender() internal view virtual returns (address payable) {\\n return msg.sender;\\n }\\n\\n function _msgData() internal view virtual returns (bytes memory) {\\n this; // silence state mutability warning without generating bytecode - see https://github.com/ethereum/solidity/issues/2691\\n return msg.data;\\n }\\n}\\n\",\"keccak256\":\"0x8d3cb350f04ff49cfb10aef08d87f19dcbaecc8027b0bed12f3275cd12f38cf0\",\"license\":\"MIT\"},\"contracts/optimistic-ethereum/libraries/resolver/Lib_AddressManager.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\npragma solidity >0.5.0 <0.8.0;\\n\\n/* External Imports */\\nimport { Ownable } from \\\"@openzeppelin/contracts/access/Ownable.sol\\\";\\n\\n/**\\n * @title Lib_AddressManager\\n */\\ncontract Lib_AddressManager is Ownable {\\n\\n /**********\\n * Events *\\n **********/\\n\\n event AddressSet(\\n string _name,\\n address _newAddress\\n );\\n\\n\\n /*************\\n * Variables *\\n *************/\\n\\n mapping (bytes32 => address) private addresses;\\n\\n\\n /********************\\n * Public Functions *\\n ********************/\\n\\n /**\\n * Changes the address associated with a particular name.\\n * @param _name String name to associate an address with.\\n * @param _address Address to associate with the name.\\n */\\n function setAddress(\\n string memory _name,\\n address _address\\n )\\n external\\n onlyOwner\\n {\\n addresses[_getNameHash(_name)] = _address;\\n\\n emit AddressSet(\\n _name,\\n _address\\n );\\n }\\n\\n /**\\n * Retrieves the address associated with a given name.\\n * @param _name Name to retrieve an address for.\\n * @return Address associated with the given name.\\n */\\n function getAddress(\\n string memory _name\\n )\\n external\\n view\\n returns (\\n address\\n )\\n {\\n return addresses[_getNameHash(_name)];\\n }\\n\\n\\n /**********************\\n * Internal Functions *\\n **********************/\\n\\n /**\\n * Computes the hash of a name.\\n * @param _name Name to compute a hash for.\\n * @return Hash of the given name.\\n */\\n function _getNameHash(\\n string memory _name\\n )\\n internal\\n pure\\n returns (\\n bytes32\\n )\\n {\\n return keccak256(abi.encodePacked(_name));\\n }\\n}\\n\",\"keccak256\":\"0xcc9fc5c64f1101a5c6c397594086b1608189a9edc5c9635e1ac38f70aeeeecbf\",\"license\":\"MIT\"}},\"version\":1}",
"bytecode": "0x608060405234801561001057600080fd5b50600061001b61006a565b600080546001600160a01b0319166001600160a01b0383169081178255604051929350917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0908290a35061006e565b3390565b6106508061007d6000396000f3fe608060405234801561001057600080fd5b50600436106100575760003560e01c8063715018a61461005c5780638da5cb5b146100665780639b2ea4bd1461008a578063bf40fac11461013b578063f2fde38b146101e1575b600080fd5b610064610207565b005b61006e6102c5565b604080516001600160a01b039092168252519081900360200190f35b610064600480360360408110156100a057600080fd5b8101906020810181356401000000008111156100bb57600080fd5b8201836020820111156100cd57600080fd5b803590602001918460018302840111640100000000831117156100ef57600080fd5b91908080601f016020809104026020016040519081016040528093929190818152602001838380828437600092019190915250929550505090356001600160a01b031691506102d49050565b61006e6004803603602081101561015157600080fd5b81019060208101813564010000000081111561016c57600080fd5b82018360208201111561017e57600080fd5b803590602001918460018302840111640100000000831117156101a057600080fd5b91908080601f016020809104026020016040519081016040528093929190818152602001838380828437600092019190915250929550610436945050505050565b610064600480360360208110156101f757600080fd5b50356001600160a01b0316610465565b61020f610579565b6001600160a01b03166102206102c5565b6001600160a01b03161461027b576040805162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604482015290519081900360640190fd5b600080546040516001600160a01b03909116907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0908390a3600080546001600160a01b0319169055565b6000546001600160a01b031690565b6102dc610579565b6001600160a01b03166102ed6102c5565b6001600160a01b031614610348576040805162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604482015290519081900360640190fd5b80600160006103568561057d565b815260200190815260200160002060006101000a8154816001600160a01b0302191690836001600160a01b031602179055507f188466739ff00cc68bfb2367d23ae4b855264264fe1624caa8884399af23454c82826040518080602001836001600160a01b03168152602001828103825284818151815260200191508051906020019080838360005b838110156103f75781810151838201526020016103df565b50505050905090810190601f1680156104245780820380516001836020036101000a031916815260200191505b50935050505060405180910390a15050565b6000600160006104458461057d565b81526020810191909152604001600020546001600160a01b031692915050565b61046d610579565b6001600160a01b031661047e6102c5565b6001600160a01b0316146104d9576040805162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604482015290519081900360640190fd5b6001600160a01b03811661051e5760405162461bcd60e51b81526004018080602001828103825260268152602001806105f56026913960400191505060405180910390fd5b600080546040516001600160a01b03808516939216917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e091a3600080546001600160a01b0319166001600160a01b0392909216919091179055565b3390565b6000816040516020018082805190602001908083835b602083106105b25780518252601f199092019160209182019101610593565b6001836020036101000a03801982511681845116808217855250505050505090500191505060405160208183030381529060405280519060200120905091905056fe4f776e61626c653a206e6577206f776e657220697320746865207a65726f2061646472657373a26469706673582212204a95fb185077bedee9e8a29a2d18e7398dc688fcfeb979fef060e7ac4073b45464736f6c63430007060033",
"deployedBytecode": "0x608060405234801561001057600080fd5b50600436106100575760003560e01c8063715018a61461005c5780638da5cb5b146100665780639b2ea4bd1461008a578063bf40fac11461013b578063f2fde38b146101e1575b600080fd5b610064610207565b005b61006e6102c5565b604080516001600160a01b039092168252519081900360200190f35b610064600480360360408110156100a057600080fd5b8101906020810181356401000000008111156100bb57600080fd5b8201836020820111156100cd57600080fd5b803590602001918460018302840111640100000000831117156100ef57600080fd5b91908080601f016020809104026020016040519081016040528093929190818152602001838380828437600092019190915250929550505090356001600160a01b031691506102d49050565b61006e6004803603602081101561015157600080fd5b81019060208101813564010000000081111561016c57600080fd5b82018360208201111561017e57600080fd5b803590602001918460018302840111640100000000831117156101a057600080fd5b91908080601f016020809104026020016040519081016040528093929190818152602001838380828437600092019190915250929550610436945050505050565b610064600480360360208110156101f757600080fd5b50356001600160a01b0316610465565b61020f610579565b6001600160a01b03166102206102c5565b6001600160a01b03161461027b576040805162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604482015290519081900360640190fd5b600080546040516001600160a01b03909116907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0908390a3600080546001600160a01b0319169055565b6000546001600160a01b031690565b6102dc610579565b6001600160a01b03166102ed6102c5565b6001600160a01b031614610348576040805162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604482015290519081900360640190fd5b80600160006103568561057d565b815260200190815260200160002060006101000a8154816001600160a01b0302191690836001600160a01b031602179055507f188466739ff00cc68bfb2367d23ae4b855264264fe1624caa8884399af23454c82826040518080602001836001600160a01b03168152602001828103825284818151815260200191508051906020019080838360005b838110156103f75781810151838201526020016103df565b50505050905090810190601f1680156104245780820380516001836020036101000a031916815260200191505b50935050505060405180910390a15050565b6000600160006104458461057d565b81526020810191909152604001600020546001600160a01b031692915050565b61046d610579565b6001600160a01b031661047e6102c5565b6001600160a01b0316146104d9576040805162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604482015290519081900360640190fd5b6001600160a01b03811661051e5760405162461bcd60e51b81526004018080602001828103825260268152602001806105f56026913960400191505060405180910390fd5b600080546040516001600160a01b03808516939216917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e091a3600080546001600160a01b0319166001600160a01b0392909216919091179055565b3390565b6000816040516020018082805190602001908083835b602083106105b25780518252601f199092019160209182019101610593565b6001836020036101000a03801982511681845116808217855250505050505090500191505060405160208183030381529060405280519060200120905091905056fe4f776e61626c653a206e6577206f776e657220697320746865207a65726f2061646472657373a26469706673582212204a95fb185077bedee9e8a29a2d18e7398dc688fcfeb979fef060e7ac4073b45464736f6c63430007060033",
"devdoc": {
"kind": "dev",
"methods": {},
"methods": {
"getAddress(string)": {
"params": {
"_name": "Name to retrieve an address for."
},
"returns": {
"_0": "Address associated with the given name."
}
},
"owner()": {
"details": "Returns the address of the current owner."
},
"renounceOwnership()": {
"details": "Leaves the contract without owner. It will not be possible to call `onlyOwner` functions anymore. Can only be called by the current owner. NOTE: Renouncing ownership will leave the contract without an owner, thereby removing any functionality that is only available to the owner."
},
"setAddress(string,address)": {
"params": {
"_address": "Address to associate with the name.",
"_name": "String name to associate an address with."
}
},
"transferOwnership(address)": {
"details": "Transfers ownership of the contract to a new account (`newOwner`). Can only be called by the current owner."
}
},
"title": "Lib_AddressManager",
"version": 1
},
"userdoc": {
"kind": "user",
"methods": {},
"methods": {
"getAddress(string)": {
"notice": "Retrieves the address associated with a given name."
},
"setAddress(string,address)": {
"notice": "Changes the address associated with a particular name."
}
},
"version": 1
},
"storageLayout": {
"storage": [
{
"astId": 12586,
"astId": 664,
"contract": "contracts/optimistic-ethereum/libraries/resolver/Lib_AddressManager.sol:Lib_AddressManager",
"label": "owner",
"label": "_owner",
"offset": 0,
"slot": "0",
"type": "t_address"
},
{
"astId": 12494,
"astId": 12793,
"contract": "contracts/optimistic-ethereum/libraries/resolver/Lib_AddressManager.sol:Lib_AddressManager",
"label": "addresses",
"offset": 0,
......
This source diff could not be displayed because it is too large. You can view the blob instead.
This source diff could not be displayed because it is too large. You can view the blob instead.
This source diff could not be displayed because it is too large. You can view the blob instead.
This source diff could not be displayed because it is too large. You can view the blob instead.
This source diff could not be displayed because it is too large. You can view the blob instead.
This source diff could not be displayed because it is too large. You can view the blob instead.
This source diff could not be displayed because it is too large. You can view the blob instead.
{
"address": "0x384bC62a4bb9aE617c8dD0eC351d7780444EFDc0",
"address": "0x40c9067ec8087EcF101FC10d2673636955b81A32",
"abi": [
{
"inputs": [],
......@@ -70,6 +70,13 @@
"stateMutability": "payable",
"type": "function"
},
{
"inputs": [],
"name": "donateETH",
"outputs": [],
"stateMutability": "payable",
"type": "function"
},
{
"inputs": [
{
......@@ -145,6 +152,19 @@
"stateMutability": "view",
"type": "function"
},
{
"inputs": [
{
"internalType": "address payable",
"name": "_to",
"type": "address"
}
],
"name": "migrateEth",
"outputs": [],
"stateMutability": "nonpayable",
"type": "function"
},
{
"inputs": [],
"name": "ovmEth",
......@@ -170,7 +190,7 @@
"outputs": [
{
"internalType": "address",
"name": "_contract",
"name": "",
"type": "address"
}
],
......@@ -182,27 +202,27 @@
"type": "receive"
}
],
"transactionHash": "0xa573fb68f6e9c62b7b5df7796822c181efdcfc05efd3d9d34a119121b54765d0",
"transactionHash": "0xac7e6ccfa141ea21c7b61df91f8fa959c3511a03620f9454eb30127db36d4728",
"receipt": {
"to": null,
"from": "0x77C4c8f491e5ff22a2C0E18b005c3BA0Fe36c1Bc",
"contractAddress": "0x384bC62a4bb9aE617c8dD0eC351d7780444EFDc0",
"transactionIndex": 186,
"gasUsed": "599914",
"from": "0xd033f09cB85621F98F7A84C64dB381ac16Eff818",
"contractAddress": "0x40c9067ec8087EcF101FC10d2673636955b81A32",
"transactionIndex": 226,
"gasUsed": "698930",
"logsBloom": "0x00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000",
"blockHash": "0xea2f409173c3b697f9badb641ba910536bf708d8f9cafa603890671e2e08d493",
"transactionHash": "0xa573fb68f6e9c62b7b5df7796822c181efdcfc05efd3d9d34a119121b54765d0",
"blockHash": "0x90752aa20b2cd9833bae07978ff62448296af979223745e985082ec1815dc60d",
"transactionHash": "0xac7e6ccfa141ea21c7b61df91f8fa959c3511a03620f9454eb30127db36d4728",
"logs": [],
"blockNumber": 12208108,
"cumulativeGasUsed": "12426887",
"blockNumber": 12410915,
"cumulativeGasUsed": "12706291",
"status": 1,
"byzantium": true
},
"args": [],
"solcInputHash": "43ee6bb8ef92595aa6d0e22a6c464dff",
"metadata": "{\"compiler\":{\"version\":\"0.7.6+commit.7338295f\"},\"language\":\"Solidity\",\"output\":{\"abi\":[{\"inputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"constructor\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"_from\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"address\",\"name\":\"_to\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"_amount\",\"type\":\"uint256\"}],\"name\":\"DepositInitiated\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"_to\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"_amount\",\"type\":\"uint256\"}],\"name\":\"WithdrawalFinalized\",\"type\":\"event\"},{\"inputs\":[],\"name\":\"deposit\",\"outputs\":[],\"stateMutability\":\"payable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_to\",\"type\":\"address\"}],\"name\":\"depositTo\",\"outputs\":[],\"stateMutability\":\"payable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_to\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"_amount\",\"type\":\"uint256\"}],\"name\":\"finalizeWithdrawal\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"getFinalizeDepositL2Gas\",\"outputs\":[{\"internalType\":\"uint32\",\"name\":\"\",\"type\":\"uint32\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_libAddressManager\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"_ovmEth\",\"type\":\"address\"}],\"name\":\"initialize\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"libAddressManager\",\"outputs\":[{\"internalType\":\"contract Lib_AddressManager\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"messenger\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"ovmEth\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"string\",\"name\":\"_name\",\"type\":\"string\"}],\"name\":\"resolve\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"_contract\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"stateMutability\":\"payable\",\"type\":\"receive\"}],\"devdoc\":{\"details\":\"The L1 ETH Gateway is a contract which stores deposited ETH that is in use on L2. Compiler used: solc Runtime target: EVM\",\"kind\":\"dev\",\"methods\":{\"deposit()\":{\"details\":\"deposit an amount of the ETH to the caller's balance on L2\"},\"depositTo(address)\":{\"details\":\"deposit an amount of ETH to a recipients's balance on L2\",\"params\":{\"_to\":\"L2 address to credit the withdrawal to\"}},\"finalizeWithdrawal(address,uint256)\":{\"details\":\"Complete a withdrawal from L2 to L1, and credit funds to the recipient's balance of the L1 ETH token. Since only the xDomainMessenger can call this function, it will never be called before the withdrawal is finalized. \",\"params\":{\"_amount\":\"Amount of the ETH to withdraw\",\"_to\":\"L1 address to credit the withdrawal to\"}},\"initialize(address,address)\":{\"params\":{\"_libAddressManager\":\"Address manager for this OE deployment\",\"_ovmEth\":\"L2 OVM_ETH implementation of iOVM_DepositedToken\"}}},\"title\":\"OVM_L1ETHGateway\",\"version\":1},\"userdoc\":{\"kind\":\"user\",\"methods\":{},\"version\":1}},\"settings\":{\"compilationTarget\":{\"contracts/optimistic-ethereum/OVM/bridge/tokens/OVM_L1ETHGateway.sol\":\"OVM_L1ETHGateway\"},\"evmVersion\":\"istanbul\",\"libraries\":{},\"metadata\":{\"bytecodeHash\":\"none\",\"useLiteralContent\":true},\"optimizer\":{\"enabled\":true,\"runs\":200},\"remappings\":[]},\"sources\":{\"contracts/optimistic-ethereum/OVM/bridge/tokens/OVM_L1ETHGateway.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// @unsupported: ovm\\npragma solidity >0.5.0 <0.8.0;\\npragma experimental ABIEncoderV2;\\n\\n/* Interface Imports */\\nimport { iOVM_L1ETHGateway } from \\\"../../../iOVM/bridge/tokens/iOVM_L1ETHGateway.sol\\\";\\nimport { iOVM_L2DepositedToken } from \\\"../../../iOVM/bridge/tokens/iOVM_L2DepositedToken.sol\\\";\\n\\n/* Library Imports */\\nimport { OVM_CrossDomainEnabled } from \\\"../../../libraries/bridge/OVM_CrossDomainEnabled.sol\\\";\\nimport { Lib_AddressResolver } from \\\"../../../libraries/resolver/Lib_AddressResolver.sol\\\";\\nimport { Lib_AddressManager } from \\\"../../../libraries/resolver/Lib_AddressManager.sol\\\";\\n\\n/**\\n * @title OVM_L1ETHGateway\\n * @dev The L1 ETH Gateway is a contract which stores deposited ETH that is in use on L2.\\n *\\n * Compiler used: solc\\n * Runtime target: EVM\\n */\\ncontract OVM_L1ETHGateway is iOVM_L1ETHGateway, OVM_CrossDomainEnabled, Lib_AddressResolver {\\n\\n /********************\\n * Public Constants *\\n ********************/\\n\\n uint32 public constant override getFinalizeDepositL2Gas = 1200000;\\n\\n /********************************\\n * External Contract References *\\n ********************************/\\n\\n address public ovmEth;\\n\\n /***************\\n * Constructor *\\n ***************/\\n\\n // This contract lives behind a proxy, so the constructor parameters will go unused.\\n constructor()\\n OVM_CrossDomainEnabled(address(0))\\n Lib_AddressResolver(address(0))\\n public\\n {}\\n\\n /******************\\n * Initialization *\\n ******************/\\n\\n /**\\n * @param _libAddressManager Address manager for this OE deployment\\n * @param _ovmEth L2 OVM_ETH implementation of iOVM_DepositedToken\\n */\\n function initialize(\\n address _libAddressManager,\\n address _ovmEth\\n )\\n public\\n {\\n require(libAddressManager == Lib_AddressManager(0), \\\"Contract has already been initialized.\\\");\\n libAddressManager = Lib_AddressManager(_libAddressManager);\\n ovmEth = _ovmEth;\\n messenger = resolve(\\\"Proxy__OVM_L1CrossDomainMessenger\\\");\\n }\\n\\n /**************\\n * Depositing *\\n **************/\\n\\n receive()\\n external\\n payable\\n {\\n _initiateDeposit(msg.sender, msg.sender);\\n }\\n\\n /**\\n * @dev deposit an amount of the ETH to the caller's balance on L2\\n */\\n function deposit() \\n external\\n override\\n payable\\n {\\n _initiateDeposit(msg.sender, msg.sender);\\n }\\n\\n /**\\n * @dev deposit an amount of ETH to a recipients's balance on L2\\n * @param _to L2 address to credit the withdrawal to\\n */\\n function depositTo(\\n address _to\\n )\\n external\\n override\\n payable\\n {\\n _initiateDeposit(msg.sender, _to);\\n }\\n\\n /**\\n * @dev Performs the logic for deposits by storing the ETH and informing the L2 ETH Gateway of the deposit.\\n *\\n * @param _from Account to pull the deposit from on L1\\n * @param _to Account to give the deposit to on L2\\n */\\n function _initiateDeposit(\\n address _from,\\n address _to\\n )\\n internal\\n {\\n // Construct calldata for l2ETHGateway.finalizeDeposit(_to, _amount)\\n bytes memory data =\\n abi.encodeWithSelector(\\n iOVM_L2DepositedToken.finalizeDeposit.selector,\\n _to,\\n msg.value\\n );\\n\\n // Send calldata into L2\\n sendCrossDomainMessage(\\n ovmEth,\\n data,\\n getFinalizeDepositL2Gas\\n );\\n\\n emit DepositInitiated(_from, _to, msg.value);\\n }\\n\\n /*************************\\n * Cross-chain Functions *\\n *************************/\\n\\n /**\\n * @dev Complete a withdrawal from L2 to L1, and credit funds to the recipient's balance of the\\n * L1 ETH token.\\n * Since only the xDomainMessenger can call this function, it will never be called before the withdrawal is finalized. \\n *\\n * @param _to L1 address to credit the withdrawal to\\n * @param _amount Amount of the ETH to withdraw\\n */\\n function finalizeWithdrawal(\\n address _to,\\n uint256 _amount\\n )\\n external\\n override\\n onlyFromCrossDomainAccount(ovmEth)\\n {\\n _safeTransferETH(_to, _amount);\\n\\n emit WithdrawalFinalized(_to, _amount);\\n }\\n\\n /**********************************\\n * Internal Functions: Accounting *\\n **********************************/\\n\\n /**\\n * @dev Internal accounting function for moving around L1 ETH.\\n *\\n * @param _to L1 address to transfer ETH to\\n * @param _value Amount of ETH to send to\\n */\\n function _safeTransferETH(\\n address _to,\\n uint256 _value\\n )\\n internal\\n {\\n (bool success, ) = _to.call{value: _value}(new bytes(0));\\n require(success, 'TransferHelper::safeTransferETH: ETH transfer failed');\\n }\\n}\\n\",\"keccak256\":\"0x2fff613bf362d01f05d8653247fe46b07dd7bb21c460a30e471d45b7ebd0e627\",\"license\":\"MIT\"},\"contracts/optimistic-ethereum/iOVM/bridge/messaging/iAbs_BaseCrossDomainMessenger.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\npragma solidity >0.5.0 <0.8.0;\\npragma experimental ABIEncoderV2;\\n\\n/**\\n * @title iAbs_BaseCrossDomainMessenger\\n */\\ninterface iAbs_BaseCrossDomainMessenger {\\n\\n /**********\\n * Events *\\n **********/\\n event SentMessage(bytes message);\\n event RelayedMessage(bytes32 msgHash);\\n\\n /**********************\\n * Contract Variables *\\n **********************/\\n function xDomainMessageSender() external view returns (address);\\n\\n /********************\\n * Public Functions *\\n ********************/\\n\\n /**\\n * Sends a cross domain message to the target messenger.\\n * @param _target Target contract address.\\n * @param _message Message to send to the target.\\n * @param _gasLimit Gas limit for the provided message.\\n */\\n function sendMessage(\\n address _target,\\n bytes calldata _message,\\n uint32 _gasLimit\\n ) external;\\n}\\n\",\"keccak256\":\"0xc2bd6b373daae2ede34281f4be5938d02b9d1cfb056b40d65ff70b7f16ce3c86\",\"license\":\"MIT\"},\"contracts/optimistic-ethereum/iOVM/bridge/tokens/iOVM_L1ETHGateway.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\npragma solidity >0.5.0;\\npragma experimental ABIEncoderV2;\\n\\n/**\\n * @title iOVM_L1ETHGateway\\n */\\ninterface iOVM_L1ETHGateway {\\n\\n /**********\\n * Events *\\n **********/\\n\\n event DepositInitiated(\\n address indexed _from,\\n address _to,\\n uint256 _amount\\n );\\n\\n event WithdrawalFinalized(\\n address indexed _to,\\n uint256 _amount\\n );\\n\\n /********************\\n * Public Functions *\\n ********************/\\n\\n function deposit()\\n external\\n payable;\\n\\n function depositTo(\\n address _to\\n )\\n external\\n payable;\\n\\n /*************************\\n * Cross-chain Functions *\\n *************************/\\n\\n function finalizeWithdrawal(\\n address _to,\\n uint _amount\\n )\\n external;\\n\\n function getFinalizeDepositL2Gas()\\n external\\n view\\n returns(\\n uint32\\n );\\n}\\n\",\"keccak256\":\"0x7e6805c5cacfd159410c7cd57a3d586e0fc5810bc46600bbd840a252e243e5ba\",\"license\":\"MIT\"},\"contracts/optimistic-ethereum/iOVM/bridge/tokens/iOVM_L2DepositedToken.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\npragma solidity >0.5.0;\\npragma experimental ABIEncoderV2;\\n\\n/**\\n * @title iOVM_L2DepositedToken\\n */\\ninterface iOVM_L2DepositedToken {\\n\\n /**********\\n * Events *\\n **********/\\n\\n event WithdrawalInitiated(\\n address indexed _from,\\n address _to,\\n uint256 _amount\\n );\\n\\n event DepositFinalized(\\n address indexed _to,\\n uint256 _amount\\n ); \\n\\n\\n /********************\\n * Public Functions *\\n ********************/\\n\\n function withdraw(\\n uint _amount\\n )\\n external;\\n\\n function withdrawTo(\\n address _to,\\n uint _amount\\n )\\n external;\\n\\n\\n /*************************\\n * Cross-chain Functions *\\n *************************/\\n\\n function finalizeDeposit(\\n address _to,\\n uint _amount\\n )\\n external;\\n}\\n\",\"keccak256\":\"0xaa874355e98c444a58712179acaf5ca344296dfa8229577a38a1d14160ce46f8\",\"license\":\"MIT\"},\"contracts/optimistic-ethereum/libraries/bridge/OVM_CrossDomainEnabled.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\npragma solidity >0.5.0 <0.8.0;\\n/* Interface Imports */\\nimport { iAbs_BaseCrossDomainMessenger } from \\\"../../iOVM/bridge/messaging/iAbs_BaseCrossDomainMessenger.sol\\\";\\n\\n/**\\n * @title OVM_CrossDomainEnabled\\n * @dev Helper contract for contracts performing cross-domain communications\\n *\\n * Compiler used: defined by inheriting contract\\n * Runtime target: defined by inheriting contract\\n */\\ncontract OVM_CrossDomainEnabled {\\n // Messenger contract used to send and recieve messages from the other domain.\\n address public messenger;\\n\\n /***************\\n * Constructor *\\n ***************/ \\n constructor(\\n address _messenger\\n ) {\\n messenger = _messenger;\\n }\\n\\n /**********************\\n * Function Modifiers *\\n **********************/\\n\\n /**\\n * @notice Enforces that the modified function is only callable by a specific cross-domain account.\\n * @param _sourceDomainAccount The only account on the originating domain which is authenticated to call this function.\\n */\\n modifier onlyFromCrossDomainAccount(\\n address _sourceDomainAccount\\n ) {\\n require(\\n msg.sender == address(getCrossDomainMessenger()),\\n \\\"OVM_XCHAIN: messenger contract unauthenticated\\\"\\n );\\n\\n require(\\n getCrossDomainMessenger().xDomainMessageSender() == _sourceDomainAccount,\\n \\\"OVM_XCHAIN: wrong sender of cross-domain message\\\"\\n );\\n\\n _;\\n }\\n \\n /**********************\\n * Internal Functions *\\n **********************/\\n\\n /**\\n * @notice Gets the messenger, usually from storage. This function is exposed in case a child contract needs to override.\\n * @return The address of the cross-domain messenger contract which should be used. \\n */\\n function getCrossDomainMessenger()\\n internal\\n virtual\\n returns(\\n iAbs_BaseCrossDomainMessenger\\n )\\n {\\n return iAbs_BaseCrossDomainMessenger(messenger);\\n }\\n\\n /**\\n * @notice Sends a message to an account on another domain\\n * @param _crossDomainTarget The intended recipient on the destination domain\\n * @param _data The data to send to the target (usually calldata to a function with `onlyFromCrossDomainAccount()`)\\n * @param _gasLimit The gasLimit for the receipt of the message on the target domain.\\n */\\n function sendCrossDomainMessage(\\n address _crossDomainTarget,\\n bytes memory _data,\\n uint32 _gasLimit\\n ) internal {\\n getCrossDomainMessenger().sendMessage(_crossDomainTarget, _data, _gasLimit);\\n }\\n}\\n\",\"keccak256\":\"0x1b1c5adbb359f3f46ca9e43b366a80563c031560e9f1f24ab4742b2d79403ce7\",\"license\":\"MIT\"},\"contracts/optimistic-ethereum/libraries/resolver/Lib_AddressManager.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\npragma solidity >0.5.0 <0.8.0;\\n\\n/* Contract Imports */\\nimport { Ownable } from \\\"./Lib_Ownable.sol\\\";\\n\\n/**\\n * @title Lib_AddressManager\\n */\\ncontract Lib_AddressManager is Ownable {\\n\\n /**********\\n * Events *\\n **********/\\n\\n event AddressSet(\\n string _name,\\n address _newAddress\\n );\\n\\n /*******************************************\\n * Contract Variables: Internal Accounting *\\n *******************************************/\\n\\n mapping (bytes32 => address) private addresses;\\n\\n\\n /********************\\n * Public Functions *\\n ********************/\\n\\n function setAddress(\\n string memory _name,\\n address _address\\n )\\n public\\n onlyOwner\\n {\\n emit AddressSet(_name, _address);\\n addresses[_getNameHash(_name)] = _address;\\n }\\n\\n function getAddress(\\n string memory _name\\n )\\n public\\n view\\n returns (address)\\n {\\n return addresses[_getNameHash(_name)];\\n }\\n\\n\\n /**********************\\n * Internal Functions *\\n **********************/\\n\\n function _getNameHash(\\n string memory _name\\n )\\n internal\\n pure\\n returns (\\n bytes32 _hash\\n )\\n {\\n return keccak256(abi.encodePacked(_name));\\n }\\n}\\n\",\"keccak256\":\"0x3a490595cc21ff170e4027843093670ff845d5972481fbfb956b722ea564bb06\",\"license\":\"MIT\"},\"contracts/optimistic-ethereum/libraries/resolver/Lib_AddressResolver.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\npragma solidity >0.5.0 <0.8.0;\\n\\n/* Library Imports */\\nimport { Lib_AddressManager } from \\\"./Lib_AddressManager.sol\\\";\\n\\n/**\\n * @title Lib_AddressResolver\\n */\\nabstract contract Lib_AddressResolver {\\n\\n /*******************************************\\n * Contract Variables: Contract References *\\n *******************************************/\\n\\n Lib_AddressManager public libAddressManager;\\n\\n\\n /***************\\n * Constructor *\\n ***************/\\n\\n /**\\n * @param _libAddressManager Address of the Lib_AddressManager.\\n */\\n constructor(\\n address _libAddressManager\\n ) {\\n libAddressManager = Lib_AddressManager(_libAddressManager);\\n }\\n\\n\\n /********************\\n * Public Functions *\\n ********************/\\n\\n function resolve(\\n string memory _name\\n )\\n public\\n view\\n returns (\\n address _contract\\n )\\n {\\n return libAddressManager.getAddress(_name);\\n }\\n}\\n\",\"keccak256\":\"0xaa3ed342f6deb156c660fd83afa579a3b80db17eb465e8949cf5c1b114780143\",\"license\":\"MIT\"},\"contracts/optimistic-ethereum/libraries/resolver/Lib_Ownable.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\npragma solidity >0.5.0 <0.8.0;\\n\\n/**\\n * @title Ownable\\n * @dev Adapted from https://github.com/OpenZeppelin/openzeppelin-contracts/blob/master/contracts/access/Ownable.sol\\n */\\nabstract contract Ownable {\\n\\n /*************\\n * Variables *\\n *************/\\n\\n address public owner;\\n\\n\\n /**********\\n * Events *\\n **********/\\n\\n event OwnershipTransferred(\\n address indexed previousOwner,\\n address indexed newOwner\\n );\\n\\n\\n /***************\\n * Constructor *\\n ***************/\\n\\n constructor() {\\n owner = msg.sender;\\n emit OwnershipTransferred(address(0), owner);\\n }\\n\\n\\n /**********************\\n * Function Modifiers *\\n **********************/\\n\\n modifier onlyOwner() {\\n require(\\n owner == msg.sender,\\n \\\"Ownable: caller is not the owner\\\"\\n );\\n _;\\n }\\n\\n\\n /********************\\n * Public Functions *\\n ********************/\\n\\n function renounceOwnership()\\n public\\n virtual\\n onlyOwner\\n {\\n emit OwnershipTransferred(owner, address(0));\\n owner = address(0);\\n }\\n\\n function transferOwnership(address _newOwner)\\n public\\n virtual\\n onlyOwner\\n {\\n require(\\n _newOwner != address(0),\\n \\\"Ownable: new owner cannot be the zero address\\\"\\n );\\n\\n emit OwnershipTransferred(owner, _newOwner);\\n owner = _newOwner;\\n }\\n}\\n\",\"keccak256\":\"0xd9dfd9264e5b5fedd53a5b10fdf179c3f367614b0fe69179bce4e45119f5b739\",\"license\":\"MIT\"}},\"version\":1}",
"bytecode": "0x608060405234801561001057600080fd5b50600080546001600160a01b03199081169091556001805490911690556109d28061003c6000396000f3fe60806040526004361061008a5760003560e01c8063485cc95511610059578063485cc95514610122578063490b5b7814610142578063b760faf914610157578063d0e30db01461016a578063f4f7b41a146101725761009b565b80631273a090146100a0578063299ca478146100cb5780633cb747bf146100ed578063461a4478146101025761009b565b3661009b576100993333610192565b005b600080fd5b3480156100ac57600080fd5b506100b5610246565b6040516100c29190610935565b60405180910390f35b3480156100d757600080fd5b506100e061024d565b6040516100c29190610865565b3480156100f957600080fd5b506100e061025c565b34801561010e57600080fd5b506100e061011d366004610797565b61026b565b34801561012e57600080fd5b5061009961013d36600461073c565b610347565b34801561014e57600080fd5b506100e06103ef565b61009961016536600461071b565b6103fe565b61009961040b565b34801561017e57600080fd5b5061009961018d36600461076e565b610417565b6000638d6e9a5b60e01b82346040516024016101af929190610879565b60408051601f198184030181529190526020810180516001600160e01b03166001600160e01b0319909316929092179091526002549091506101fe906001600160a01b03168262124f80610578565b826001600160a01b03167ff531653a5819e21265de50358610d55dbe6594c61605b209dfa4280d277938c18334604051610239929190610879565b60405180910390a2505050565b62124f8081565b6001546001600160a01b031681565b6000546001600160a01b031681565b60015460405163bf40fac160e01b81526020600482018181528451602484015284516000946001600160a01b03169363bf40fac1938793928392604401918501908083838b5b838110156102c95781810151838201526020016102b1565b50505050905090810190601f1680156102f65780820380516001836020036101000a031916815260200191505b509250505060206040518083038186803b15801561031357600080fd5b505afa158015610327573d6000803e3d6000fd5b505050506040513d602081101561033d57600080fd5b505190505b919050565b6001546001600160a01b0316156103795760405162461bcd60e51b8152600401610370906108e6565b60405180910390fd5b600180546001600160a01b038085166001600160a01b0319928316179092556002805492841692909116919091179055604080516060810190915260218082526103cb91906109a5602083013961026b565b600080546001600160a01b0319166001600160a01b03929092169190911790555050565b6002546001600160a01b031681565b6104083382610192565b50565b6104153333610192565b565b6002546001600160a01b031661042b610663565b6001600160a01b0316336001600160a01b03161461047a5760405162461bcd60e51b815260040180806020018281038252602e815260200180610947602e913960400191505060405180910390fd5b806001600160a01b031661048c610663565b6001600160a01b0316636e296e456040518163ffffffff1660e01b815260040160206040518083038186803b1580156104c457600080fd5b505afa1580156104d8573d6000803e3d6000fd5b505050506040513d60208110156104ee57600080fd5b50516001600160a01b0316146105355760405162461bcd60e51b81526004018080602001828103825260308152602001806109756030913960400191505060405180910390fd5b61053f8383610672565b826001600160a01b03167f9e5c4f9f4e46b8629d3dda85f43a69194f50254404a72dc62b9e932d9c94eda883604051610239919061092c565b610580610663565b6001600160a01b0316633dbb202b8484846040518463ffffffff1660e01b815260040180846001600160a01b03168152602001806020018363ffffffff168152602001828103825284818151815260200191508051906020019080838360005b838110156105f85781810151838201526020016105e0565b50505050905090810190601f1680156106255780820380516001836020036101000a031916815260200191505b50945050505050600060405180830381600087803b15801561064657600080fd5b505af115801561065a573d6000803e3d6000fd5b50505050505050565b6000546001600160a01b031690565b604080516000808252602082019092526001600160a01b03841690839060405161069c919061082c565b60006040518083038185875af1925050503d80600081146106d9576040519150601f19603f3d011682016040523d82523d6000602084013e6106de565b606091505b50509050806106ff5760405162461bcd60e51b815260040161037090610892565b505050565b80356001600160a01b038116811461034257600080fd5b60006020828403121561072c578081fd5b61073582610704565b9392505050565b6000806040838503121561074e578081fd5b61075783610704565b915061076560208401610704565b90509250929050565b60008060408385031215610780578182fd5b61078983610704565b946020939093013593505050565b600060208083850312156107a9578182fd5b823567ffffffffffffffff808211156107c0578384fd5b818501915085601f8301126107d3578384fd5b8135818111156107df57fe5b604051601f8201601f19168101850183811182821017156107fc57fe5b6040528181528382018501881015610812578586fd5b818585018683013790810190930193909352509392505050565b60008251815b8181101561084c5760208186018101518583015201610832565b8181111561085a5782828501525b509190910192915050565b6001600160a01b0391909116815260200190565b6001600160a01b03929092168252602082015260400190565b60208082526034908201527f5472616e7366657248656c7065723a3a736166655472616e736665724554483a60408201527308115512081d1c985b9cd9995c8819985a5b195960621b606082015260800190565b60208082526026908201527f436f6e74726163742068617320616c7265616479206265656e20696e697469616040820152653634bd32b21760d11b606082015260800190565b90815260200190565b63ffffffff9190911681526020019056fe4f564d5f58434841494e3a206d657373656e67657220636f6e747261637420756e61757468656e746963617465644f564d5f58434841494e3a2077726f6e672073656e646572206f662063726f73732d646f6d61696e206d65737361676550726f78795f5f4f564d5f4c3143726f7373446f6d61696e4d657373656e676572a164736f6c6343000706000a",
"deployedBytecode": "0x60806040526004361061008a5760003560e01c8063485cc95511610059578063485cc95514610122578063490b5b7814610142578063b760faf914610157578063d0e30db01461016a578063f4f7b41a146101725761009b565b80631273a090146100a0578063299ca478146100cb5780633cb747bf146100ed578063461a4478146101025761009b565b3661009b576100993333610192565b005b600080fd5b3480156100ac57600080fd5b506100b5610246565b6040516100c29190610935565b60405180910390f35b3480156100d757600080fd5b506100e061024d565b6040516100c29190610865565b3480156100f957600080fd5b506100e061025c565b34801561010e57600080fd5b506100e061011d366004610797565b61026b565b34801561012e57600080fd5b5061009961013d36600461073c565b610347565b34801561014e57600080fd5b506100e06103ef565b61009961016536600461071b565b6103fe565b61009961040b565b34801561017e57600080fd5b5061009961018d36600461076e565b610417565b6000638d6e9a5b60e01b82346040516024016101af929190610879565b60408051601f198184030181529190526020810180516001600160e01b03166001600160e01b0319909316929092179091526002549091506101fe906001600160a01b03168262124f80610578565b826001600160a01b03167ff531653a5819e21265de50358610d55dbe6594c61605b209dfa4280d277938c18334604051610239929190610879565b60405180910390a2505050565b62124f8081565b6001546001600160a01b031681565b6000546001600160a01b031681565b60015460405163bf40fac160e01b81526020600482018181528451602484015284516000946001600160a01b03169363bf40fac1938793928392604401918501908083838b5b838110156102c95781810151838201526020016102b1565b50505050905090810190601f1680156102f65780820380516001836020036101000a031916815260200191505b509250505060206040518083038186803b15801561031357600080fd5b505afa158015610327573d6000803e3d6000fd5b505050506040513d602081101561033d57600080fd5b505190505b919050565b6001546001600160a01b0316156103795760405162461bcd60e51b8152600401610370906108e6565b60405180910390fd5b600180546001600160a01b038085166001600160a01b0319928316179092556002805492841692909116919091179055604080516060810190915260218082526103cb91906109a5602083013961026b565b600080546001600160a01b0319166001600160a01b03929092169190911790555050565b6002546001600160a01b031681565b6104083382610192565b50565b6104153333610192565b565b6002546001600160a01b031661042b610663565b6001600160a01b0316336001600160a01b03161461047a5760405162461bcd60e51b815260040180806020018281038252602e815260200180610947602e913960400191505060405180910390fd5b806001600160a01b031661048c610663565b6001600160a01b0316636e296e456040518163ffffffff1660e01b815260040160206040518083038186803b1580156104c457600080fd5b505afa1580156104d8573d6000803e3d6000fd5b505050506040513d60208110156104ee57600080fd5b50516001600160a01b0316146105355760405162461bcd60e51b81526004018080602001828103825260308152602001806109756030913960400191505060405180910390fd5b61053f8383610672565b826001600160a01b03167f9e5c4f9f4e46b8629d3dda85f43a69194f50254404a72dc62b9e932d9c94eda883604051610239919061092c565b610580610663565b6001600160a01b0316633dbb202b8484846040518463ffffffff1660e01b815260040180846001600160a01b03168152602001806020018363ffffffff168152602001828103825284818151815260200191508051906020019080838360005b838110156105f85781810151838201526020016105e0565b50505050905090810190601f1680156106255780820380516001836020036101000a031916815260200191505b50945050505050600060405180830381600087803b15801561064657600080fd5b505af115801561065a573d6000803e3d6000fd5b50505050505050565b6000546001600160a01b031690565b604080516000808252602082019092526001600160a01b03841690839060405161069c919061082c565b60006040518083038185875af1925050503d80600081146106d9576040519150601f19603f3d011682016040523d82523d6000602084013e6106de565b606091505b50509050806106ff5760405162461bcd60e51b815260040161037090610892565b505050565b80356001600160a01b038116811461034257600080fd5b60006020828403121561072c578081fd5b61073582610704565b9392505050565b6000806040838503121561074e578081fd5b61075783610704565b915061076560208401610704565b90509250929050565b60008060408385031215610780578182fd5b61078983610704565b946020939093013593505050565b600060208083850312156107a9578182fd5b823567ffffffffffffffff808211156107c0578384fd5b818501915085601f8301126107d3578384fd5b8135818111156107df57fe5b604051601f8201601f19168101850183811182821017156107fc57fe5b6040528181528382018501881015610812578586fd5b818585018683013790810190930193909352509392505050565b60008251815b8181101561084c5760208186018101518583015201610832565b8181111561085a5782828501525b509190910192915050565b6001600160a01b0391909116815260200190565b6001600160a01b03929092168252602082015260400190565b60208082526034908201527f5472616e7366657248656c7065723a3a736166655472616e736665724554483a60408201527308115512081d1c985b9cd9995c8819985a5b195960621b606082015260800190565b60208082526026908201527f436f6e74726163742068617320616c7265616479206265656e20696e697469616040820152653634bd32b21760d11b606082015260800190565b90815260200190565b63ffffffff9190911681526020019056fe4f564d5f58434841494e3a206d657373656e67657220636f6e747261637420756e61757468656e746963617465644f564d5f58434841494e3a2077726f6e672073656e646572206f662063726f73732d646f6d61696e206d65737361676550726f78795f5f4f564d5f4c3143726f7373446f6d61696e4d657373656e676572a164736f6c6343000706000a",
"solcInputHash": "f2bdab652d5102f5f11e78dae866798d",
"metadata": "{\"compiler\":{\"version\":\"0.7.6+commit.7338295f\"},\"language\":\"Solidity\",\"output\":{\"abi\":[{\"inputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"constructor\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"_from\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"address\",\"name\":\"_to\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"_amount\",\"type\":\"uint256\"}],\"name\":\"DepositInitiated\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"_to\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"_amount\",\"type\":\"uint256\"}],\"name\":\"WithdrawalFinalized\",\"type\":\"event\"},{\"inputs\":[],\"name\":\"deposit\",\"outputs\":[],\"stateMutability\":\"payable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_to\",\"type\":\"address\"}],\"name\":\"depositTo\",\"outputs\":[],\"stateMutability\":\"payable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"donateETH\",\"outputs\":[],\"stateMutability\":\"payable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_to\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"_amount\",\"type\":\"uint256\"}],\"name\":\"finalizeWithdrawal\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"getFinalizeDepositL2Gas\",\"outputs\":[{\"internalType\":\"uint32\",\"name\":\"\",\"type\":\"uint32\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_libAddressManager\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"_ovmEth\",\"type\":\"address\"}],\"name\":\"initialize\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"libAddressManager\",\"outputs\":[{\"internalType\":\"contract Lib_AddressManager\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"messenger\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address payable\",\"name\":\"_to\",\"type\":\"address\"}],\"name\":\"migrateEth\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"ovmEth\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"string\",\"name\":\"_name\",\"type\":\"string\"}],\"name\":\"resolve\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"stateMutability\":\"payable\",\"type\":\"receive\"}],\"devdoc\":{\"details\":\"The L1 ETH Gateway is a contract which stores deposited ETH that is in use on L2. Compiler used: solc Runtime target: EVM\",\"kind\":\"dev\",\"methods\":{\"deposit()\":{\"details\":\"deposit an amount of the ETH to the caller's balance on L2\"},\"depositTo(address)\":{\"details\":\"deposit an amount of ETH to a recipients's balance on L2\",\"params\":{\"_to\":\"L2 address to credit the withdrawal to\"}},\"donateETH()\":{\"details\":\"Adds ETH balance to the account. This is meant to allow for ETH to be migrated from an old gateway to a new gateway\"},\"finalizeWithdrawal(address,uint256)\":{\"details\":\"Complete a withdrawal from L2 to L1, and credit funds to the recipient's balance of the L1 ETH token. Since only the xDomainMessenger can call this function, it will never be called before the withdrawal is finalized.\",\"params\":{\"_amount\":\"Amount of the ETH to withdraw\",\"_to\":\"L1 address to credit the withdrawal to\"}},\"initialize(address,address)\":{\"params\":{\"_libAddressManager\":\"Address manager for this OE deployment\",\"_ovmEth\":\"L2 OVM_ETH implementation of iOVM_DepositedToken\"}},\"migrateEth(address)\":{\"details\":\"Migrates entire ETH balance to another gateway\",\"params\":{\"_to\":\"Gateway Proxy address to migrate ETH to\"}},\"resolve(string)\":{\"params\":{\"_name\":\"Name to resolve an address for.\"},\"returns\":{\"_0\":\"Address associated with the given name.\"}}},\"title\":\"OVM_L1ETHGateway\",\"version\":1},\"userdoc\":{\"kind\":\"user\",\"methods\":{\"resolve(string)\":{\"notice\":\"Resolves the address associated with a given name.\"}},\"version\":1}},\"settings\":{\"compilationTarget\":{\"contracts/optimistic-ethereum/OVM/bridge/tokens/OVM_L1ETHGateway.sol\":\"OVM_L1ETHGateway\"},\"evmVersion\":\"istanbul\",\"libraries\":{},\"metadata\":{\"bytecodeHash\":\"ipfs\",\"useLiteralContent\":true},\"optimizer\":{\"enabled\":true,\"runs\":200},\"remappings\":[]},\"sources\":{\"@openzeppelin/contracts/access/Ownable.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity >=0.6.0 <0.8.0;\\n\\nimport \\\"../utils/Context.sol\\\";\\n/**\\n * @dev Contract module which provides a basic access control mechanism, where\\n * there is an account (an owner) that can be granted exclusive access to\\n * specific functions.\\n *\\n * By default, the owner account will be the one that deploys the contract. This\\n * can later be changed with {transferOwnership}.\\n *\\n * This module is used through inheritance. It will make available the modifier\\n * `onlyOwner`, which can be applied to your functions to restrict their use to\\n * the owner.\\n */\\nabstract contract Ownable is Context {\\n address private _owner;\\n\\n event OwnershipTransferred(address indexed previousOwner, address indexed newOwner);\\n\\n /**\\n * @dev Initializes the contract setting the deployer as the initial owner.\\n */\\n constructor () internal {\\n address msgSender = _msgSender();\\n _owner = msgSender;\\n emit OwnershipTransferred(address(0), msgSender);\\n }\\n\\n /**\\n * @dev Returns the address of the current owner.\\n */\\n function owner() public view virtual returns (address) {\\n return _owner;\\n }\\n\\n /**\\n * @dev Throws if called by any account other than the owner.\\n */\\n modifier onlyOwner() {\\n require(owner() == _msgSender(), \\\"Ownable: caller is not the owner\\\");\\n _;\\n }\\n\\n /**\\n * @dev Leaves the contract without owner. It will not be possible to call\\n * `onlyOwner` functions anymore. Can only be called by the current owner.\\n *\\n * NOTE: Renouncing ownership will leave the contract without an owner,\\n * thereby removing any functionality that is only available to the owner.\\n */\\n function renounceOwnership() public virtual onlyOwner {\\n emit OwnershipTransferred(_owner, address(0));\\n _owner = address(0);\\n }\\n\\n /**\\n * @dev Transfers ownership of the contract to a new account (`newOwner`).\\n * Can only be called by the current owner.\\n */\\n function transferOwnership(address newOwner) public virtual onlyOwner {\\n require(newOwner != address(0), \\\"Ownable: new owner is the zero address\\\");\\n emit OwnershipTransferred(_owner, newOwner);\\n _owner = newOwner;\\n }\\n}\\n\",\"keccak256\":\"0x15e2d5bd4c28a88548074c54d220e8086f638a71ed07e6b3ba5a70066fcf458d\",\"license\":\"MIT\"},\"@openzeppelin/contracts/utils/Context.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity >=0.6.0 <0.8.0;\\n\\n/*\\n * @dev Provides information about the current execution context, including the\\n * sender of the transaction and its data. While these are generally available\\n * via msg.sender and msg.data, they should not be accessed in such a direct\\n * manner, since when dealing with GSN meta-transactions the account sending and\\n * paying for execution may not be the actual sender (as far as an application\\n * is concerned).\\n *\\n * This contract is only required for intermediate, library-like contracts.\\n */\\nabstract contract Context {\\n function _msgSender() internal view virtual returns (address payable) {\\n return msg.sender;\\n }\\n\\n function _msgData() internal view virtual returns (bytes memory) {\\n this; // silence state mutability warning without generating bytecode - see https://github.com/ethereum/solidity/issues/2691\\n return msg.data;\\n }\\n}\\n\",\"keccak256\":\"0x8d3cb350f04ff49cfb10aef08d87f19dcbaecc8027b0bed12f3275cd12f38cf0\",\"license\":\"MIT\"},\"contracts/optimistic-ethereum/OVM/bridge/tokens/OVM_L1ETHGateway.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// @unsupported: ovm\\npragma solidity >0.5.0 <0.8.0;\\npragma experimental ABIEncoderV2;\\n\\n/* Interface Imports */\\nimport { iOVM_L1ETHGateway } from \\\"../../../iOVM/bridge/tokens/iOVM_L1ETHGateway.sol\\\";\\nimport { iOVM_L2DepositedToken } from \\\"../../../iOVM/bridge/tokens/iOVM_L2DepositedToken.sol\\\";\\n\\n/* Library Imports */\\nimport { OVM_CrossDomainEnabled } from \\\"../../../libraries/bridge/OVM_CrossDomainEnabled.sol\\\";\\nimport { Lib_AddressResolver } from \\\"../../../libraries/resolver/Lib_AddressResolver.sol\\\";\\nimport { Lib_AddressManager } from \\\"../../../libraries/resolver/Lib_AddressManager.sol\\\";\\n\\n/**\\n * @title OVM_L1ETHGateway\\n * @dev The L1 ETH Gateway is a contract which stores deposited ETH that is in use on L2.\\n *\\n * Compiler used: solc\\n * Runtime target: EVM\\n */\\ncontract OVM_L1ETHGateway is iOVM_L1ETHGateway, OVM_CrossDomainEnabled, Lib_AddressResolver {\\n\\n /********************\\n * Public Constants *\\n ********************/\\n\\n uint32 public constant override getFinalizeDepositL2Gas = 1200000;\\n\\n /********************************\\n * External Contract References *\\n ********************************/\\n\\n address public ovmEth;\\n\\n /***************\\n * Constructor *\\n ***************/\\n\\n // This contract lives behind a proxy, so the constructor parameters will go unused.\\n constructor()\\n OVM_CrossDomainEnabled(address(0))\\n Lib_AddressResolver(address(0))\\n public\\n {}\\n\\n /******************\\n * Initialization *\\n ******************/\\n\\n /**\\n * @param _libAddressManager Address manager for this OE deployment\\n * @param _ovmEth L2 OVM_ETH implementation of iOVM_DepositedToken\\n */\\n function initialize(\\n address _libAddressManager,\\n address _ovmEth\\n )\\n public\\n {\\n require(libAddressManager == Lib_AddressManager(0), \\\"Contract has already been initialized.\\\");\\n libAddressManager = Lib_AddressManager(_libAddressManager);\\n ovmEth = _ovmEth;\\n messenger = resolve(\\\"Proxy__OVM_L1CrossDomainMessenger\\\");\\n }\\n\\n /**************\\n * Depositing *\\n **************/\\n\\n receive()\\n external\\n payable\\n {\\n _initiateDeposit(msg.sender, msg.sender);\\n }\\n\\n /**\\n * @dev deposit an amount of the ETH to the caller's balance on L2\\n */\\n function deposit()\\n external\\n override\\n payable\\n {\\n _initiateDeposit(msg.sender, msg.sender);\\n }\\n\\n /**\\n * @dev deposit an amount of ETH to a recipients's balance on L2\\n * @param _to L2 address to credit the withdrawal to\\n */\\n function depositTo(\\n address _to\\n )\\n external\\n override\\n payable\\n {\\n _initiateDeposit(msg.sender, _to);\\n }\\n\\n /**\\n * @dev Performs the logic for deposits by storing the ETH and informing the L2 ETH Gateway of the deposit.\\n *\\n * @param _from Account to pull the deposit from on L1\\n * @param _to Account to give the deposit to on L2\\n */\\n function _initiateDeposit(\\n address _from,\\n address _to\\n )\\n internal\\n {\\n // Construct calldata for l2ETHGateway.finalizeDeposit(_to, _amount)\\n bytes memory data =\\n abi.encodeWithSelector(\\n iOVM_L2DepositedToken.finalizeDeposit.selector,\\n _to,\\n msg.value\\n );\\n\\n // Send calldata into L2\\n sendCrossDomainMessage(\\n ovmEth,\\n data,\\n getFinalizeDepositL2Gas\\n );\\n\\n emit DepositInitiated(_from, _to, msg.value);\\n }\\n\\n /*************************\\n * Cross-chain Functions *\\n *************************/\\n\\n /**\\n * @dev Complete a withdrawal from L2 to L1, and credit funds to the recipient's balance of the\\n * L1 ETH token.\\n * Since only the xDomainMessenger can call this function, it will never be called before the withdrawal is finalized.\\n *\\n * @param _to L1 address to credit the withdrawal to\\n * @param _amount Amount of the ETH to withdraw\\n */\\n function finalizeWithdrawal(\\n address _to,\\n uint256 _amount\\n )\\n external\\n override\\n onlyFromCrossDomainAccount(ovmEth)\\n {\\n _safeTransferETH(_to, _amount);\\n\\n emit WithdrawalFinalized(_to, _amount);\\n }\\n\\n /**********************************\\n * Internal Functions: Accounting *\\n **********************************/\\n\\n /**\\n * @dev Internal accounting function for moving around L1 ETH.\\n *\\n * @param _to L1 address to transfer ETH to\\n * @param _value Amount of ETH to send to\\n */\\n function _safeTransferETH(\\n address _to,\\n uint256 _value\\n )\\n internal\\n {\\n (bool success, ) = _to.call{value: _value}(new bytes(0));\\n require(success, 'TransferHelper::safeTransferETH: ETH transfer failed');\\n }\\n\\n /*****************************\\n * Temporary - Migrating ETH *\\n *****************************/\\n\\n /**\\n * @dev Migrates entire ETH balance to another gateway\\n * @param _to Gateway Proxy address to migrate ETH to\\n */\\n function migrateEth(address payable _to) external {\\n address owner = Lib_AddressManager(libAddressManager).owner();\\n require(msg.sender == owner, \\\"Only the owner can migrate ETH\\\");\\n uint256 balance = address(this).balance;\\n OVM_L1ETHGateway(_to).donateETH{value:balance}();\\n }\\n\\n /**\\n * @dev Adds ETH balance to the account. This is meant to allow for ETH\\n * to be migrated from an old gateway to a new gateway\\n */\\n function donateETH() external payable {}\\n}\\n\",\"keccak256\":\"0x87dd8c00176be3bde93cb69d7a1af0b2e7cac0a6db72eb69353a1ac1e0c969be\",\"license\":\"MIT\"},\"contracts/optimistic-ethereum/iOVM/bridge/messaging/iAbs_BaseCrossDomainMessenger.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\npragma solidity >0.5.0 <0.8.0;\\npragma experimental ABIEncoderV2;\\n\\n/**\\n * @title iAbs_BaseCrossDomainMessenger\\n */\\ninterface iAbs_BaseCrossDomainMessenger {\\n\\n /**********\\n * Events *\\n **********/\\n\\n event SentMessage(bytes message);\\n event RelayedMessage(bytes32 msgHash);\\n event FailedRelayedMessage(bytes32 msgHash);\\n\\n\\n /*************\\n * Variables *\\n *************/\\n\\n function xDomainMessageSender() external view returns (address);\\n\\n\\n /********************\\n * Public Functions *\\n ********************/\\n\\n /**\\n * Sends a cross domain message to the target messenger.\\n * @param _target Target contract address.\\n * @param _message Message to send to the target.\\n * @param _gasLimit Gas limit for the provided message.\\n */\\n function sendMessage(\\n address _target,\\n bytes calldata _message,\\n uint32 _gasLimit\\n ) external;\\n}\\n\",\"keccak256\":\"0x89981ed48e99d6939cc6cdef827d484fa3e2292d66c0ba5056c7050cb6282d7e\",\"license\":\"MIT\"},\"contracts/optimistic-ethereum/iOVM/bridge/tokens/iOVM_L1ETHGateway.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\npragma solidity >0.5.0;\\npragma experimental ABIEncoderV2;\\n\\n/**\\n * @title iOVM_L1ETHGateway\\n */\\ninterface iOVM_L1ETHGateway {\\n\\n /**********\\n * Events *\\n **********/\\n\\n event DepositInitiated(\\n address indexed _from,\\n address _to,\\n uint256 _amount\\n );\\n\\n event WithdrawalFinalized(\\n address indexed _to,\\n uint256 _amount\\n );\\n\\n /********************\\n * Public Functions *\\n ********************/\\n\\n function deposit()\\n external\\n payable;\\n\\n function depositTo(\\n address _to\\n )\\n external\\n payable;\\n\\n /*************************\\n * Cross-chain Functions *\\n *************************/\\n\\n function finalizeWithdrawal(\\n address _to,\\n uint _amount\\n )\\n external;\\n\\n function getFinalizeDepositL2Gas()\\n external\\n view\\n returns(\\n uint32\\n );\\n}\\n\",\"keccak256\":\"0x7e6805c5cacfd159410c7cd57a3d586e0fc5810bc46600bbd840a252e243e5ba\",\"license\":\"MIT\"},\"contracts/optimistic-ethereum/iOVM/bridge/tokens/iOVM_L2DepositedToken.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\npragma solidity >0.5.0;\\npragma experimental ABIEncoderV2;\\n\\n/**\\n * @title iOVM_L2DepositedToken\\n */\\ninterface iOVM_L2DepositedToken {\\n\\n /**********\\n * Events *\\n **********/\\n\\n event WithdrawalInitiated(\\n address indexed _from,\\n address _to,\\n uint256 _amount\\n );\\n\\n event DepositFinalized(\\n address indexed _to,\\n uint256 _amount\\n );\\n\\n\\n /********************\\n * Public Functions *\\n ********************/\\n\\n function withdraw(\\n uint _amount\\n )\\n external;\\n\\n function withdrawTo(\\n address _to,\\n uint _amount\\n )\\n external;\\n\\n\\n /*************************\\n * Cross-chain Functions *\\n *************************/\\n\\n function finalizeDeposit(\\n address _to,\\n uint _amount\\n )\\n external;\\n}\\n\",\"keccak256\":\"0x59c807dfb01dbc00409431820457c350681af30d2f972a065231483a8ec926c4\",\"license\":\"MIT\"},\"contracts/optimistic-ethereum/libraries/bridge/OVM_CrossDomainEnabled.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\npragma solidity >0.5.0 <0.8.0;\\n\\n/* Interface Imports */\\nimport { iAbs_BaseCrossDomainMessenger } from \\\"../../iOVM/bridge/messaging/iAbs_BaseCrossDomainMessenger.sol\\\";\\n\\n/**\\n * @title OVM_CrossDomainEnabled\\n * @dev Helper contract for contracts performing cross-domain communications\\n *\\n * Compiler used: defined by inheriting contract\\n * Runtime target: defined by inheriting contract\\n */\\ncontract OVM_CrossDomainEnabled {\\n\\n /*************\\n * Variables *\\n *************/\\n\\n // Messenger contract used to send and recieve messages from the other domain.\\n address public messenger;\\n\\n\\n /***************\\n * Constructor *\\n ***************/ \\n\\n /**\\n * @param _messenger Address of the CrossDomainMessenger on the current layer.\\n */\\n constructor(\\n address _messenger\\n ) {\\n messenger = _messenger;\\n }\\n\\n\\n /**********************\\n * Function Modifiers *\\n **********************/\\n\\n /**\\n * Enforces that the modified function is only callable by a specific cross-domain account.\\n * @param _sourceDomainAccount The only account on the originating domain which is\\n * authenticated to call this function.\\n */\\n modifier onlyFromCrossDomainAccount(\\n address _sourceDomainAccount\\n ) {\\n require(\\n msg.sender == address(getCrossDomainMessenger()),\\n \\\"OVM_XCHAIN: messenger contract unauthenticated\\\"\\n );\\n\\n require(\\n getCrossDomainMessenger().xDomainMessageSender() == _sourceDomainAccount,\\n \\\"OVM_XCHAIN: wrong sender of cross-domain message\\\"\\n );\\n\\n _;\\n }\\n\\n\\n /**********************\\n * Internal Functions *\\n **********************/\\n\\n /**\\n * Gets the messenger, usually from storage. This function is exposed in case a child contract\\n * needs to override.\\n * @return The address of the cross-domain messenger contract which should be used. \\n */\\n function getCrossDomainMessenger()\\n internal\\n virtual\\n returns (\\n iAbs_BaseCrossDomainMessenger\\n )\\n {\\n return iAbs_BaseCrossDomainMessenger(messenger);\\n }\\n\\n /**\\n * Sends a message to an account on another domain\\n * @param _crossDomainTarget The intended recipient on the destination domain\\n * @param _data The data to send to the target (usually calldata to a function with\\n * `onlyFromCrossDomainAccount()`)\\n * @param _gasLimit The gasLimit for the receipt of the message on the target domain.\\n */\\n function sendCrossDomainMessage(\\n address _crossDomainTarget,\\n bytes memory _data,\\n uint32 _gasLimit\\n )\\n internal\\n {\\n getCrossDomainMessenger().sendMessage(_crossDomainTarget, _data, _gasLimit);\\n }\\n}\\n\",\"keccak256\":\"0x054c802a5c1318566b7727ff5327a1ad4dc0f18038a4586b7ada467cc6b08761\",\"license\":\"MIT\"},\"contracts/optimistic-ethereum/libraries/resolver/Lib_AddressManager.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\npragma solidity >0.5.0 <0.8.0;\\n\\n/* External Imports */\\nimport { Ownable } from \\\"@openzeppelin/contracts/access/Ownable.sol\\\";\\n\\n/**\\n * @title Lib_AddressManager\\n */\\ncontract Lib_AddressManager is Ownable {\\n\\n /**********\\n * Events *\\n **********/\\n\\n event AddressSet(\\n string _name,\\n address _newAddress\\n );\\n\\n\\n /*************\\n * Variables *\\n *************/\\n\\n mapping (bytes32 => address) private addresses;\\n\\n\\n /********************\\n * Public Functions *\\n ********************/\\n\\n /**\\n * Changes the address associated with a particular name.\\n * @param _name String name to associate an address with.\\n * @param _address Address to associate with the name.\\n */\\n function setAddress(\\n string memory _name,\\n address _address\\n )\\n external\\n onlyOwner\\n {\\n addresses[_getNameHash(_name)] = _address;\\n\\n emit AddressSet(\\n _name,\\n _address\\n );\\n }\\n\\n /**\\n * Retrieves the address associated with a given name.\\n * @param _name Name to retrieve an address for.\\n * @return Address associated with the given name.\\n */\\n function getAddress(\\n string memory _name\\n )\\n external\\n view\\n returns (\\n address\\n )\\n {\\n return addresses[_getNameHash(_name)];\\n }\\n\\n\\n /**********************\\n * Internal Functions *\\n **********************/\\n\\n /**\\n * Computes the hash of a name.\\n * @param _name Name to compute a hash for.\\n * @return Hash of the given name.\\n */\\n function _getNameHash(\\n string memory _name\\n )\\n internal\\n pure\\n returns (\\n bytes32\\n )\\n {\\n return keccak256(abi.encodePacked(_name));\\n }\\n}\\n\",\"keccak256\":\"0xcc9fc5c64f1101a5c6c397594086b1608189a9edc5c9635e1ac38f70aeeeecbf\",\"license\":\"MIT\"},\"contracts/optimistic-ethereum/libraries/resolver/Lib_AddressResolver.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\npragma solidity >0.5.0 <0.8.0;\\n\\n/* Library Imports */\\nimport { Lib_AddressManager } from \\\"./Lib_AddressManager.sol\\\";\\n\\n/**\\n * @title Lib_AddressResolver\\n */\\nabstract contract Lib_AddressResolver {\\n\\n /*************\\n * Variables *\\n *************/\\n\\n Lib_AddressManager public libAddressManager;\\n\\n\\n /***************\\n * Constructor *\\n ***************/\\n\\n /**\\n * @param _libAddressManager Address of the Lib_AddressManager.\\n */\\n constructor(\\n address _libAddressManager\\n ) {\\n libAddressManager = Lib_AddressManager(_libAddressManager);\\n }\\n\\n\\n /********************\\n * Public Functions *\\n ********************/\\n\\n /**\\n * Resolves the address associated with a given name.\\n * @param _name Name to resolve an address for.\\n * @return Address associated with the given name.\\n */\\n function resolve(\\n string memory _name\\n )\\n public\\n view\\n returns (\\n address\\n )\\n {\\n return libAddressManager.getAddress(_name);\\n }\\n}\\n\",\"keccak256\":\"0x65981feeabff6a81783ea97d44baf988a18a86c8cb374c46fdb71819cbacc7c0\",\"license\":\"MIT\"}},\"version\":1}",
"bytecode": "0x608060405234801561001057600080fd5b50600080546001600160a01b0319908116909155600180549091169055610b978061003c6000396000f3fe6080604052600436106100a05760003560e01c8063485cc95511610064578063485cc95514610158578063490b5b78146101785780638b4c40b01461018d578063b760faf914610195578063d0e30db0146101a8578063f4f7b41a146101b0576100b1565b80631273a090146100b6578063175dc507146100e1578063299ca478146101015780633cb747bf14610123578063461a447814610138576100b1565b366100b1576100af33336101d0565b005b600080fd5b3480156100c257600080fd5b506100cb610284565b6040516100d89190610abc565b60405180910390f35b3480156100ed57600080fd5b506100af6100fc366004610845565b61028b565b34801561010d57600080fd5b50610116610399565b6040516100d891906109b5565b34801561012f57600080fd5b506101166103a8565b34801561014457600080fd5b506101166101533660046108e7565b6103b7565b34801561016457600080fd5b506100af610173366004610884565b610491565b34801561018457600080fd5b50610116610530565b6100af61053f565b6100af6101a3366004610845565b610541565b6100af61054e565b3480156101bc57600080fd5b506100af6101cb3660046108bc565b610558565b6000638d6e9a5b60e01b82346040516024016101ed9291906109c9565b60408051601f198184030181529190526020810180516001600160e01b03166001600160e01b03199093169290921790915260025490915061023c906001600160a01b03168262124f806106b9565b826001600160a01b03167ff531653a5819e21265de50358610d55dbe6594c61605b209dfa4280d277938c183346040516102779291906109c9565b60405180910390a2505050565b62124f8081565b60015460408051638da5cb5b60e01b815290516000926001600160a01b031691638da5cb5b916004808301926020929190829003018186803b1580156102d057600080fd5b505afa1580156102e4573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906103089190610868565b9050336001600160a01b0382161461033b5760405162461bcd60e51b8152600401610332906109e2565b60405180910390fd5b6000479050826001600160a01b0316638b4c40b0826040518263ffffffff1660e01b81526004016000604051808303818588803b15801561037b57600080fd5b505af115801561038f573d6000803e3d6000fd5b5050505050505050565b6001546001600160a01b031681565b6000546001600160a01b031681565b60015460405163bf40fac160e01b81526020600482018181528451602484015284516000946001600160a01b03169363bf40fac1938793928392604401918501908083838b5b838110156104155781810151838201526020016103fd565b50505050905090810190601f1680156104425780820380516001836020036101000a031916815260200191505b509250505060206040518083038186803b15801561045f57600080fd5b505afa158015610473573d6000803e3d6000fd5b505050506040513d602081101561048957600080fd5b505192915050565b6001546001600160a01b0316156104ba5760405162461bcd60e51b815260040161033290610a6d565b600180546001600160a01b038085166001600160a01b03199283161790925560028054928416929091169190911790556040805160608101909152602180825261050c9190610b4160208301396103b7565b600080546001600160a01b0319166001600160a01b03929092169190911790555050565b6002546001600160a01b031681565b565b61054b33826101d0565b50565b61053f33336101d0565b6002546001600160a01b031661056c6107a4565b6001600160a01b0316336001600160a01b0316146105bb5760405162461bcd60e51b815260040180806020018281038252602e815260200180610ae3602e913960400191505060405180910390fd5b806001600160a01b03166105cd6107a4565b6001600160a01b0316636e296e456040518163ffffffff1660e01b815260040160206040518083038186803b15801561060557600080fd5b505afa158015610619573d6000803e3d6000fd5b505050506040513d602081101561062f57600080fd5b50516001600160a01b0316146106765760405162461bcd60e51b8152600401808060200182810382526030815260200180610b116030913960400191505060405180910390fd5b61068083836107b3565b826001600160a01b03167f9e5c4f9f4e46b8629d3dda85f43a69194f50254404a72dc62b9e932d9c94eda8836040516102779190610ab3565b6106c16107a4565b6001600160a01b0316633dbb202b8484846040518463ffffffff1660e01b815260040180846001600160a01b03168152602001806020018363ffffffff168152602001828103825284818151815260200191508051906020019080838360005b83811015610739578181015183820152602001610721565b50505050905090810190601f1680156107665780820380516001836020036101000a031916815260200191505b50945050505050600060405180830381600087803b15801561078757600080fd5b505af115801561079b573d6000803e3d6000fd5b50505050505050565b6000546001600160a01b031690565b604080516000808252602082019092526001600160a01b0384169083906040516107dd919061097c565b60006040518083038185875af1925050503d806000811461081a576040519150601f19603f3d011682016040523d82523d6000602084013e61081f565b606091505b50509050806108405760405162461bcd60e51b815260040161033290610a19565b505050565b600060208284031215610856578081fd5b813561086181610acd565b9392505050565b600060208284031215610879578081fd5b815161086181610acd565b60008060408385031215610896578081fd5b82356108a181610acd565b915060208301356108b181610acd565b809150509250929050565b600080604083850312156108ce578182fd5b82356108d981610acd565b946020939093013593505050565b600060208083850312156108f9578182fd5b823567ffffffffffffffff80821115610910578384fd5b818501915085601f830112610923578384fd5b81358181111561092f57fe5b604051601f8201601f191681018501838111828210171561094c57fe5b6040528181528382018501881015610962578586fd5b818585018683013790810190930193909352509392505050565b60008251815b8181101561099c5760208186018101518583015201610982565b818111156109aa5782828501525b509190910192915050565b6001600160a01b0391909116815260200190565b6001600160a01b03929092168252602082015260400190565b6020808252601e908201527f4f6e6c7920746865206f776e65722063616e206d696772617465204554480000604082015260600190565b60208082526034908201527f5472616e7366657248656c7065723a3a736166655472616e736665724554483a60408201527308115512081d1c985b9cd9995c8819985a5b195960621b606082015260800190565b60208082526026908201527f436f6e74726163742068617320616c7265616479206265656e20696e697469616040820152653634bd32b21760d11b606082015260800190565b90815260200190565b63ffffffff91909116815260200190565b6001600160a01b038116811461054b57600080fdfe4f564d5f58434841494e3a206d657373656e67657220636f6e747261637420756e61757468656e746963617465644f564d5f58434841494e3a2077726f6e672073656e646572206f662063726f73732d646f6d61696e206d65737361676550726f78795f5f4f564d5f4c3143726f7373446f6d61696e4d657373656e676572a26469706673582212206941c23a3d320250801ba2fad4fc6bf0aa38a77f09cc5358b9733f6cce18c7a264736f6c63430007060033",
"deployedBytecode": "0x6080604052600436106100a05760003560e01c8063485cc95511610064578063485cc95514610158578063490b5b78146101785780638b4c40b01461018d578063b760faf914610195578063d0e30db0146101a8578063f4f7b41a146101b0576100b1565b80631273a090146100b6578063175dc507146100e1578063299ca478146101015780633cb747bf14610123578063461a447814610138576100b1565b366100b1576100af33336101d0565b005b600080fd5b3480156100c257600080fd5b506100cb610284565b6040516100d89190610abc565b60405180910390f35b3480156100ed57600080fd5b506100af6100fc366004610845565b61028b565b34801561010d57600080fd5b50610116610399565b6040516100d891906109b5565b34801561012f57600080fd5b506101166103a8565b34801561014457600080fd5b506101166101533660046108e7565b6103b7565b34801561016457600080fd5b506100af610173366004610884565b610491565b34801561018457600080fd5b50610116610530565b6100af61053f565b6100af6101a3366004610845565b610541565b6100af61054e565b3480156101bc57600080fd5b506100af6101cb3660046108bc565b610558565b6000638d6e9a5b60e01b82346040516024016101ed9291906109c9565b60408051601f198184030181529190526020810180516001600160e01b03166001600160e01b03199093169290921790915260025490915061023c906001600160a01b03168262124f806106b9565b826001600160a01b03167ff531653a5819e21265de50358610d55dbe6594c61605b209dfa4280d277938c183346040516102779291906109c9565b60405180910390a2505050565b62124f8081565b60015460408051638da5cb5b60e01b815290516000926001600160a01b031691638da5cb5b916004808301926020929190829003018186803b1580156102d057600080fd5b505afa1580156102e4573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906103089190610868565b9050336001600160a01b0382161461033b5760405162461bcd60e51b8152600401610332906109e2565b60405180910390fd5b6000479050826001600160a01b0316638b4c40b0826040518263ffffffff1660e01b81526004016000604051808303818588803b15801561037b57600080fd5b505af115801561038f573d6000803e3d6000fd5b5050505050505050565b6001546001600160a01b031681565b6000546001600160a01b031681565b60015460405163bf40fac160e01b81526020600482018181528451602484015284516000946001600160a01b03169363bf40fac1938793928392604401918501908083838b5b838110156104155781810151838201526020016103fd565b50505050905090810190601f1680156104425780820380516001836020036101000a031916815260200191505b509250505060206040518083038186803b15801561045f57600080fd5b505afa158015610473573d6000803e3d6000fd5b505050506040513d602081101561048957600080fd5b505192915050565b6001546001600160a01b0316156104ba5760405162461bcd60e51b815260040161033290610a6d565b600180546001600160a01b038085166001600160a01b03199283161790925560028054928416929091169190911790556040805160608101909152602180825261050c9190610b4160208301396103b7565b600080546001600160a01b0319166001600160a01b03929092169190911790555050565b6002546001600160a01b031681565b565b61054b33826101d0565b50565b61053f33336101d0565b6002546001600160a01b031661056c6107a4565b6001600160a01b0316336001600160a01b0316146105bb5760405162461bcd60e51b815260040180806020018281038252602e815260200180610ae3602e913960400191505060405180910390fd5b806001600160a01b03166105cd6107a4565b6001600160a01b0316636e296e456040518163ffffffff1660e01b815260040160206040518083038186803b15801561060557600080fd5b505afa158015610619573d6000803e3d6000fd5b505050506040513d602081101561062f57600080fd5b50516001600160a01b0316146106765760405162461bcd60e51b8152600401808060200182810382526030815260200180610b116030913960400191505060405180910390fd5b61068083836107b3565b826001600160a01b03167f9e5c4f9f4e46b8629d3dda85f43a69194f50254404a72dc62b9e932d9c94eda8836040516102779190610ab3565b6106c16107a4565b6001600160a01b0316633dbb202b8484846040518463ffffffff1660e01b815260040180846001600160a01b03168152602001806020018363ffffffff168152602001828103825284818151815260200191508051906020019080838360005b83811015610739578181015183820152602001610721565b50505050905090810190601f1680156107665780820380516001836020036101000a031916815260200191505b50945050505050600060405180830381600087803b15801561078757600080fd5b505af115801561079b573d6000803e3d6000fd5b50505050505050565b6000546001600160a01b031690565b604080516000808252602082019092526001600160a01b0384169083906040516107dd919061097c565b60006040518083038185875af1925050503d806000811461081a576040519150601f19603f3d011682016040523d82523d6000602084013e61081f565b606091505b50509050806108405760405162461bcd60e51b815260040161033290610a19565b505050565b600060208284031215610856578081fd5b813561086181610acd565b9392505050565b600060208284031215610879578081fd5b815161086181610acd565b60008060408385031215610896578081fd5b82356108a181610acd565b915060208301356108b181610acd565b809150509250929050565b600080604083850312156108ce578182fd5b82356108d981610acd565b946020939093013593505050565b600060208083850312156108f9578182fd5b823567ffffffffffffffff80821115610910578384fd5b818501915085601f830112610923578384fd5b81358181111561092f57fe5b604051601f8201601f191681018501838111828210171561094c57fe5b6040528181528382018501881015610962578586fd5b818585018683013790810190930193909352509392505050565b60008251815b8181101561099c5760208186018101518583015201610982565b818111156109aa5782828501525b509190910192915050565b6001600160a01b0391909116815260200190565b6001600160a01b03929092168252602082015260400190565b6020808252601e908201527f4f6e6c7920746865206f776e65722063616e206d696772617465204554480000604082015260600190565b60208082526034908201527f5472616e7366657248656c7065723a3a736166655472616e736665724554483a60408201527308115512081d1c985b9cd9995c8819985a5b195960621b606082015260800190565b60208082526026908201527f436f6e74726163742068617320616c7265616479206265656e20696e697469616040820152653634bd32b21760d11b606082015260800190565b90815260200190565b63ffffffff91909116815260200190565b6001600160a01b038116811461054b57600080fdfe4f564d5f58434841494e3a206d657373656e67657220636f6e747261637420756e61757468656e746963617465644f564d5f58434841494e3a2077726f6e672073656e646572206f662063726f73732d646f6d61696e206d65737361676550726f78795f5f4f564d5f4c3143726f7373446f6d61696e4d657373656e676572a26469706673582212206941c23a3d320250801ba2fad4fc6bf0aa38a77f09cc5358b9733f6cce18c7a264736f6c63430007060033",
"devdoc": {
"details": "The L1 ETH Gateway is a contract which stores deposited ETH that is in use on L2. Compiler used: solc Runtime target: EVM",
"kind": "dev",
......@@ -216,8 +236,11 @@
"_to": "L2 address to credit the withdrawal to"
}
},
"donateETH()": {
"details": "Adds ETH balance to the account. This is meant to allow for ETH to be migrated from an old gateway to a new gateway"
},
"finalizeWithdrawal(address,uint256)": {
"details": "Complete a withdrawal from L2 to L1, and credit funds to the recipient's balance of the L1 ETH token. Since only the xDomainMessenger can call this function, it will never be called before the withdrawal is finalized. ",
"details": "Complete a withdrawal from L2 to L1, and credit funds to the recipient's balance of the L1 ETH token. Since only the xDomainMessenger can call this function, it will never be called before the withdrawal is finalized.",
"params": {
"_amount": "Amount of the ETH to withdraw",
"_to": "L1 address to credit the withdrawal to"
......@@ -228,6 +251,20 @@
"_libAddressManager": "Address manager for this OE deployment",
"_ovmEth": "L2 OVM_ETH implementation of iOVM_DepositedToken"
}
},
"migrateEth(address)": {
"details": "Migrates entire ETH balance to another gateway",
"params": {
"_to": "Gateway Proxy address to migrate ETH to"
}
},
"resolve(string)": {
"params": {
"_name": "Name to resolve an address for."
},
"returns": {
"_0": "Address associated with the given name."
}
}
},
"title": "OVM_L1ETHGateway",
......@@ -235,13 +272,17 @@
},
"userdoc": {
"kind": "user",
"methods": {},
"methods": {
"resolve(string)": {
"notice": "Resolves the address associated with a given name."
}
},
"version": 1
},
"storageLayout": {
"storage": [
{
"astId": 11770,
"astId": 12044,
"contract": "contracts/optimistic-ethereum/OVM/bridge/tokens/OVM_L1ETHGateway.sol:OVM_L1ETHGateway",
"label": "messenger",
"offset": 0,
......@@ -249,15 +290,15 @@
"type": "t_address"
},
{
"astId": 12554,
"astId": 12856,
"contract": "contracts/optimistic-ethereum/OVM/bridge/tokens/OVM_L1ETHGateway.sol:OVM_L1ETHGateway",
"label": "libAddressManager",
"offset": 0,
"slot": "1",
"type": "t_contract(Lib_AddressManager)12547"
"type": "t_contract(Lib_AddressManager)12849"
},
{
"astId": 1967,
"astId": 2661,
"contract": "contracts/optimistic-ethereum/OVM/bridge/tokens/OVM_L1ETHGateway.sol:OVM_L1ETHGateway",
"label": "ovmEth",
"offset": 0,
......@@ -271,7 +312,7 @@
"label": "address",
"numberOfBytes": "20"
},
"t_contract(Lib_AddressManager)12547": {
"t_contract(Lib_AddressManager)12849": {
"encoding": "inplace",
"label": "contract Lib_AddressManager",
"numberOfBytes": "20"
......
This source diff could not be displayed because it is too large. You can view the blob instead.
{
"address": "0x4667c625b36Df62e393a9483BCfB2F00cA0708D1",
"address": "0xD87eFbBb82f1B7d25469641ee2E0E513f144394C",
"abi": [
{
"inputs": [
......@@ -21,27 +21,27 @@
"type": "function"
}
],
"transactionHash": "0xe5484c392dda889be19833aeb6383296e35e1bad24c67507d2f4a61ce349ef88",
"transactionHash": "0x2968f1ad5acf532a8e41953e5d2feb06ee4c81ddf364453b2e31f018d83463ea",
"receipt": {
"to": null,
"from": "0x77C4c8f491e5ff22a2C0E18b005c3BA0Fe36c1Bc",
"contractAddress": "0x4667c625b36Df62e393a9483BCfB2F00cA0708D1",
"transactionIndex": 33,
"gasUsed": "234686",
"from": "0xd033f09cB85621F98F7A84C64dB381ac16Eff818",
"contractAddress": "0xD87eFbBb82f1B7d25469641ee2E0E513f144394C",
"transactionIndex": 53,
"gasUsed": "243548",
"logsBloom": "0x00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000",
"blockHash": "0x2bce69cd7d405ef5c24996ea8a0f677db85952d8b3ea79a8ec010bc0ec048657",
"transactionHash": "0xe5484c392dda889be19833aeb6383296e35e1bad24c67507d2f4a61ce349ef88",
"blockHash": "0x3916378de09329074abbb245a436330dfb8646cd9a1af7e5b7de1cd736f8aced",
"transactionHash": "0x2968f1ad5acf532a8e41953e5d2feb06ee4c81ddf364453b2e31f018d83463ea",
"logs": [],
"blockNumber": 12208095,
"cumulativeGasUsed": "2623646",
"blockNumber": 12410855,
"cumulativeGasUsed": "5205613",
"status": 1,
"byzantium": true
},
"args": [],
"solcInputHash": "43ee6bb8ef92595aa6d0e22a6c464dff",
"metadata": "{\"compiler\":{\"version\":\"0.7.6+commit.7338295f\"},\"language\":\"Solidity\",\"output\":{\"abi\":[{\"inputs\":[{\"internalType\":\"bytes\",\"name\":\"_bytecode\",\"type\":\"bytes\"}],\"name\":\"isBytecodeSafe\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"pure\",\"type\":\"function\"}],\"devdoc\":{\"details\":\"The Safety Checker verifies that contracts deployed on L2 do not contain any \\\"unsafe\\\" operations. An operation is considered unsafe if it would access state variables which are specific to the environment (ie. L1 or L2) in which it is executed, as this could be used to \\\"escape the sandbox\\\" of the OVM, resulting in non-deterministic fraud proofs. That is, an attacker would be able to \\\"prove fraud\\\" on an honestly applied transaction. Note that a \\\"safe\\\" contract requires opcodes to appear in a particular pattern; omission of \\\"unsafe\\\" opcodes is necessary, but not sufficient. Compiler used: solc Runtime target: EVM\",\"kind\":\"dev\",\"methods\":{\"isBytecodeSafe(bytes)\":{\"params\":{\"_bytecode\":\"The bytecode to safety check.\"},\"returns\":{\"_0\":\"`true` if the bytecode is safe, `false` otherwise.\"}}},\"title\":\"OVM_SafetyChecker\",\"version\":1},\"userdoc\":{\"kind\":\"user\",\"methods\":{\"isBytecodeSafe(bytes)\":{\"notice\":\"Returns whether or not all of the provided bytecode is safe.\"}},\"version\":1}},\"settings\":{\"compilationTarget\":{\"contracts/optimistic-ethereum/OVM/execution/OVM_SafetyChecker.sol\":\"OVM_SafetyChecker\"},\"evmVersion\":\"istanbul\",\"libraries\":{},\"metadata\":{\"bytecodeHash\":\"none\",\"useLiteralContent\":true},\"optimizer\":{\"enabled\":true,\"runs\":200},\"remappings\":[]},\"sources\":{\"contracts/optimistic-ethereum/OVM/execution/OVM_SafetyChecker.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\npragma solidity >0.5.0 <0.8.0;\\n\\n/* Interface Imports */\\nimport { iOVM_SafetyChecker } from \\\"../../iOVM/execution/iOVM_SafetyChecker.sol\\\";\\n\\n/**\\n * @title OVM_SafetyChecker\\n * @dev The Safety Checker verifies that contracts deployed on L2 do not contain any\\n * \\\"unsafe\\\" operations. An operation is considered unsafe if it would access state variables which\\n * are specific to the environment (ie. L1 or L2) in which it is executed, as this could be used\\n * to \\\"escape the sandbox\\\" of the OVM, resulting in non-deterministic fraud proofs. \\n * That is, an attacker would be able to \\\"prove fraud\\\" on an honestly applied transaction.\\n * Note that a \\\"safe\\\" contract requires opcodes to appear in a particular pattern;\\n * omission of \\\"unsafe\\\" opcodes is necessary, but not sufficient.\\n *\\n * Compiler used: solc\\n * Runtime target: EVM\\n */\\ncontract OVM_SafetyChecker is iOVM_SafetyChecker {\\n\\n /********************\\n * Public Functions *\\n ********************/\\n\\n /**\\n * Returns whether or not all of the provided bytecode is safe.\\n * @param _bytecode The bytecode to safety check.\\n * @return `true` if the bytecode is safe, `false` otherwise.\\n */\\n function isBytecodeSafe(\\n bytes memory _bytecode\\n )\\n override\\n external\\n pure\\n returns (\\n bool\\n )\\n {\\n // autogenerated by gen_safety_checker_constants.py\\n // number of bytes to skip for each opcode\\n uint256[8] memory opcodeSkippableBytes = [\\n uint256(0x0001010101010101010101010000000001010101010101010101010101010000),\\n uint256(0x0100000000000000000000000000000000000000010101010101000000010100),\\n uint256(0x0000000000000000000000000000000001010101000000010101010100000000),\\n uint256(0x0203040500000000000000000000000000000000000000000000000000000000),\\n uint256(0x0101010101010101010101010101010101010101010101010101010101010101),\\n uint256(0x0101010101000000000000000000000000000000000000000000000000000000),\\n uint256(0x0000000000000000000000000000000000000000000000000000000000000000),\\n uint256(0x0000000000000000000000000000000000000000000000000000000000000000)\\n ];\\n // Mask to gate opcode specific cases\\n uint256 opcodeGateMask = ~uint256(0xffffffffffffffffffffffe000000000fffffffff070ffff9c0ffffec000f001);\\n // Halting opcodes\\n uint256 opcodeHaltingMask = ~uint256(0x4008000000000000000000000000000000000000004000000000000000000001);\\n // PUSH opcodes\\n uint256 opcodePushMask = ~uint256(0xffffffff000000000000000000000000);\\n\\n uint256 codeLength;\\n uint256 _pc;\\n assembly {\\n _pc := add(_bytecode, 0x20)\\n }\\n codeLength = _pc + _bytecode.length;\\n do {\\n // current opcode: 0x00...0xff\\n uint256 opNum;\\n\\n // inline assembly removes the extra add + bounds check\\n assembly {\\n let word := mload(_pc) //load the next 32 bytes at pc into word\\n\\n // Look up number of bytes to skip from opcodeSkippableBytes and then update indexInWord\\n // E.g. the 02030405 in opcodeSkippableBytes is the number of bytes to skip for PUSH1->4\\n // We repeat this 6 times, thus we can only skip bytes for up to PUSH4 ((1+4) * 6 = 30 < 32).\\n // If we see an opcode that is listed as 0 skippable bytes e.g. PUSH5,\\n // then we will get stuck on that indexInWord and then opNum will be set to the PUSH5 opcode.\\n let indexInWord := byte(0, mload(add(opcodeSkippableBytes, byte(0, word))))\\n indexInWord := add(indexInWord, byte(0, mload(add(opcodeSkippableBytes, byte(indexInWord, word)))))\\n indexInWord := add(indexInWord, byte(0, mload(add(opcodeSkippableBytes, byte(indexInWord, word)))))\\n indexInWord := add(indexInWord, byte(0, mload(add(opcodeSkippableBytes, byte(indexInWord, word)))))\\n indexInWord := add(indexInWord, byte(0, mload(add(opcodeSkippableBytes, byte(indexInWord, word)))))\\n indexInWord := add(indexInWord, byte(0, mload(add(opcodeSkippableBytes, byte(indexInWord, word)))))\\n _pc := add(_pc, indexInWord)\\n\\n opNum := byte(indexInWord, word)\\n }\\n\\n // + push opcodes\\n // + stop opcodes [STOP(0x00),JUMP(0x56),RETURN(0xf3),INVALID(0xfe)]\\n // + caller opcode CALLER(0x33)\\n // + blacklisted opcodes\\n uint256 opBit = 1 << opNum;\\n if (opBit & opcodeGateMask == 0) {\\n if (opBit & opcodePushMask == 0) {\\n // all pushes are valid opcodes\\n // subsequent bytes are not opcodes. Skip them.\\n _pc += (opNum - 0x5e); // PUSH1 is 0x60, so opNum-0x5f = PUSHed bytes and we +1 to\\n // skip the _pc++; line below in order to save gas ((-0x5f + 1) = -0x5e)\\n continue;\\n } else if (opBit & opcodeHaltingMask == 0) {\\n // STOP or JUMP or RETURN or INVALID (Note: REVERT is blacklisted, so not included here)\\n // We are now inside unreachable code until we hit a JUMPDEST!\\n do {\\n _pc++;\\n assembly {\\n opNum := byte(0, mload(_pc))\\n }\\n // encountered a JUMPDEST\\n if (opNum == 0x5b) break;\\n // skip PUSHed bytes\\n if ((1 << opNum) & opcodePushMask == 0) _pc += (opNum - 0x5f); // opNum-0x5f = PUSHed bytes (PUSH1 is 0x60)\\n } while (_pc < codeLength);\\n // opNum is 0x5b, so we don't continue here since the pc++ is fine\\n } else if (opNum == 0x33) { // Caller opcode\\n uint256 firstOps; // next 32 bytes of bytecode\\n uint256 secondOps; // following 32 bytes of bytecode\\n\\n assembly {\\n firstOps := mload(_pc)\\n // 37 bytes total, 5 left over --> 32 - 5 bytes = 27 bytes = 216 bits\\n secondOps := shr(216, mload(add(_pc, 0x20)))\\n }\\n\\n // Call identity precompile\\n // CALLER POP PUSH1 0x00 PUSH1 0x04 GAS CALL\\n // 32 - 8 bytes = 24 bytes = 192\\n if ((firstOps >> 192) == 0x3350600060045af1) {\\n _pc += 8;\\n // Call EM and abort execution if instructed\\n // CALLER PUSH1 0x00 SWAP1 GAS CALL PC PUSH1 0x0E ADD JUMPI RETURNDATASIZE PUSH1 0x00 DUP1 RETURNDATACOPY RETURNDATASIZE PUSH1 0x00 REVERT JUMPDEST RETURNDATASIZE PUSH1 0x01 EQ ISZERO PC PUSH1 0x0a ADD JUMPI PUSH1 0x01 PUSH1 0x00 RETURN JUMPDEST \\n } else if (firstOps == 0x336000905af158600e01573d6000803e3d6000fd5b3d6001141558600a015760 && secondOps == 0x016000f35b) {\\n _pc += 37;\\n } else {\\n return false;\\n }\\n continue;\\n } else {\\n // encountered a non-whitelisted opcode!\\n return false;\\n }\\n }\\n _pc++;\\n } while (_pc < codeLength);\\n return true;\\n }\\n}\\n\",\"keccak256\":\"0xb1578ea95da5f6e7d5f5428ccc5efe629b3b9ef88fed7625fa7b78cdb9539508\",\"license\":\"MIT\"},\"contracts/optimistic-ethereum/iOVM/execution/iOVM_SafetyChecker.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\npragma solidity >0.5.0 <0.8.0;\\n\\n/**\\n * @title iOVM_SafetyChecker\\n */\\ninterface iOVM_SafetyChecker {\\n\\n /********************\\n * Public Functions *\\n ********************/\\n\\n function isBytecodeSafe(bytes calldata _bytecode) external pure returns (bool);\\n}\\n\",\"keccak256\":\"0xde6639676d4ec4f77297652d5ede2429bc93e74e11fefd9e9de4bc92dd784878\",\"license\":\"MIT\"}},\"version\":1}",
"bytecode": "0x608060405234801561001057600080fd5b5061034a806100206000396000f3fe608060405234801561001057600080fd5b506004361061002b5760003560e01c8063a44eb59a14610030575b600080fd5b6100d66004803603602081101561004657600080fd5b81019060208101813564010000000081111561006157600080fd5b82018360208201111561007357600080fd5b8035906020019184600183028401116401000000008311171561009557600080fd5b91908080601f0160208091040260200160405190810160405280939291908181526020018383808284376000920191909152509295506100ea945050505050565b604080519115158252519081900360200190f35b60408051610100810182527e0101010101010101010101000000000101010101010101010101010101000081526b010101010101000000010100600160f81b016020808301919091526f0101010100000001010101010000000092820192909252630203040560e01b60608201527f0101010101010101010101010101010101010101010101010101010101010101608082015264010101010160d81b60a0820152600060c0820181905260e0820181905283519092741fffffffff000000000f8f000063f000013fff0ffe916a40000000000000000000026117ff60f31b039163ffffffff60601b1991870181019087015b8051600081811a880151811a82811a890151821a0182811a890151821a0182811a890151821a0182811a890151821a0182811a89015190911a01918201911a6001811b86811661032057808516610239575001605d1901610326565b80861661027e575b8280600101935050825160001a915081605b141561025e57610279565b6001821b851661027157918101605e1901915b838310610241575b610320565b816033141561030f578251602084015160d81c673350600060045af160c083901c14156102b057600885019450610306565b817f336000905af158600e01573d6000803e3d6000fd5b3d6001141558600a0157601480156102e357508064016000f35b145b156102f357602585019450610306565b60009a5050505050505050505050610338565b50505050610326565b600098505050505050505050610338565b50506001015b8181106101dd57600196505050505050505b91905056fea164736f6c6343000706000a",
"deployedBytecode": "0x608060405234801561001057600080fd5b506004361061002b5760003560e01c8063a44eb59a14610030575b600080fd5b6100d66004803603602081101561004657600080fd5b81019060208101813564010000000081111561006157600080fd5b82018360208201111561007357600080fd5b8035906020019184600183028401116401000000008311171561009557600080fd5b91908080601f0160208091040260200160405190810160405280939291908181526020018383808284376000920191909152509295506100ea945050505050565b604080519115158252519081900360200190f35b60408051610100810182527e0101010101010101010101000000000101010101010101010101010101000081526b010101010101000000010100600160f81b016020808301919091526f0101010100000001010101010000000092820192909252630203040560e01b60608201527f0101010101010101010101010101010101010101010101010101010101010101608082015264010101010160d81b60a0820152600060c0820181905260e0820181905283519092741fffffffff000000000f8f000063f000013fff0ffe916a40000000000000000000026117ff60f31b039163ffffffff60601b1991870181019087015b8051600081811a880151811a82811a890151821a0182811a890151821a0182811a890151821a0182811a890151821a0182811a89015190911a01918201911a6001811b86811661032057808516610239575001605d1901610326565b80861661027e575b8280600101935050825160001a915081605b141561025e57610279565b6001821b851661027157918101605e1901915b838310610241575b610320565b816033141561030f578251602084015160d81c673350600060045af160c083901c14156102b057600885019450610306565b817f336000905af158600e01573d6000803e3d6000fd5b3d6001141558600a0157601480156102e357508064016000f35b145b156102f357602585019450610306565b60009a5050505050505050505050610338565b50505050610326565b600098505050505050505050610338565b50506001015b8181106101dd57600196505050505050505b91905056fea164736f6c6343000706000a",
"solcInputHash": "f2bdab652d5102f5f11e78dae866798d",
"metadata": "{\"compiler\":{\"version\":\"0.7.6+commit.7338295f\"},\"language\":\"Solidity\",\"output\":{\"abi\":[{\"inputs\":[{\"internalType\":\"bytes\",\"name\":\"_bytecode\",\"type\":\"bytes\"}],\"name\":\"isBytecodeSafe\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"pure\",\"type\":\"function\"}],\"devdoc\":{\"details\":\"The Safety Checker verifies that contracts deployed on L2 do not contain any \\\"unsafe\\\" operations. An operation is considered unsafe if it would access state variables which are specific to the environment (ie. L1 or L2) in which it is executed, as this could be used to \\\"escape the sandbox\\\" of the OVM, resulting in non-deterministic fraud proofs. That is, an attacker would be able to \\\"prove fraud\\\" on an honestly applied transaction. Note that a \\\"safe\\\" contract requires opcodes to appear in a particular pattern; omission of \\\"unsafe\\\" opcodes is necessary, but not sufficient. Compiler used: solc Runtime target: EVM\",\"kind\":\"dev\",\"methods\":{\"isBytecodeSafe(bytes)\":{\"params\":{\"_bytecode\":\"The bytecode to safety check.\"},\"returns\":{\"_0\":\"`true` if the bytecode is safe, `false` otherwise.\"}}},\"title\":\"OVM_SafetyChecker\",\"version\":1},\"userdoc\":{\"kind\":\"user\",\"methods\":{\"isBytecodeSafe(bytes)\":{\"notice\":\"Returns whether or not all of the provided bytecode is safe.\"}},\"version\":1}},\"settings\":{\"compilationTarget\":{\"contracts/optimistic-ethereum/OVM/execution/OVM_SafetyChecker.sol\":\"OVM_SafetyChecker\"},\"evmVersion\":\"istanbul\",\"libraries\":{},\"metadata\":{\"bytecodeHash\":\"ipfs\",\"useLiteralContent\":true},\"optimizer\":{\"enabled\":true,\"runs\":200},\"remappings\":[]},\"sources\":{\"contracts/optimistic-ethereum/OVM/execution/OVM_SafetyChecker.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\npragma solidity >0.5.0 <0.8.0;\\n\\n/* Interface Imports */\\nimport { iOVM_SafetyChecker } from \\\"../../iOVM/execution/iOVM_SafetyChecker.sol\\\";\\n\\n/**\\n * @title OVM_SafetyChecker\\n * @dev The Safety Checker verifies that contracts deployed on L2 do not contain any\\n * \\\"unsafe\\\" operations. An operation is considered unsafe if it would access state variables which\\n * are specific to the environment (ie. L1 or L2) in which it is executed, as this could be used\\n * to \\\"escape the sandbox\\\" of the OVM, resulting in non-deterministic fraud proofs.\\n * That is, an attacker would be able to \\\"prove fraud\\\" on an honestly applied transaction.\\n * Note that a \\\"safe\\\" contract requires opcodes to appear in a particular pattern;\\n * omission of \\\"unsafe\\\" opcodes is necessary, but not sufficient.\\n *\\n * Compiler used: solc\\n * Runtime target: EVM\\n */\\ncontract OVM_SafetyChecker is iOVM_SafetyChecker {\\n\\n /********************\\n * Public Functions *\\n ********************/\\n\\n /**\\n * Returns whether or not all of the provided bytecode is safe.\\n * @param _bytecode The bytecode to safety check.\\n * @return `true` if the bytecode is safe, `false` otherwise.\\n */\\n function isBytecodeSafe(\\n bytes memory _bytecode\\n )\\n override\\n external\\n pure\\n returns (\\n bool\\n )\\n {\\n // autogenerated by gen_safety_checker_constants.py\\n // number of bytes to skip for each opcode\\n uint256[8] memory opcodeSkippableBytes = [\\n uint256(0x0001010101010101010101010000000001010101010101010101010101010000),\\n uint256(0x0100000000000000000000000000000000000000010101010101000000010100),\\n uint256(0x0000000000000000000000000000000001010101000000010101010100000000),\\n uint256(0x0203040500000000000000000000000000000000000000000000000000000000),\\n uint256(0x0101010101010101010101010101010101010101010101010101010101010101),\\n uint256(0x0101010101000000000000000000000000000000000000000000000000000000),\\n uint256(0x0000000000000000000000000000000000000000000000000000000000000000),\\n uint256(0x0000000000000000000000000000000000000000000000000000000000000000)\\n ];\\n // Mask to gate opcode specific cases\\n uint256 opcodeGateMask = ~uint256(0xffffffffffffffffffffffe000000000fffffffff070ffff9c0ffffec000f001);\\n // Halting opcodes\\n uint256 opcodeHaltingMask = ~uint256(0x4008000000000000000000000000000000000000004000000000000000000001);\\n // PUSH opcodes\\n uint256 opcodePushMask = ~uint256(0xffffffff000000000000000000000000);\\n\\n uint256 codeLength;\\n uint256 _pc;\\n assembly {\\n _pc := add(_bytecode, 0x20)\\n }\\n codeLength = _pc + _bytecode.length;\\n do {\\n // current opcode: 0x00...0xff\\n uint256 opNum;\\n\\n // inline assembly removes the extra add + bounds check\\n assembly {\\n let word := mload(_pc) //load the next 32 bytes at pc into word\\n\\n // Look up number of bytes to skip from opcodeSkippableBytes and then update indexInWord\\n // E.g. the 02030405 in opcodeSkippableBytes is the number of bytes to skip for PUSH1->4\\n // We repeat this 6 times, thus we can only skip bytes for up to PUSH4 ((1+4) * 6 = 30 < 32).\\n // If we see an opcode that is listed as 0 skippable bytes e.g. PUSH5,\\n // then we will get stuck on that indexInWord and then opNum will be set to the PUSH5 opcode.\\n let indexInWord := byte(0, mload(add(opcodeSkippableBytes, byte(0, word))))\\n indexInWord := add(indexInWord, byte(0, mload(add(opcodeSkippableBytes, byte(indexInWord, word)))))\\n indexInWord := add(indexInWord, byte(0, mload(add(opcodeSkippableBytes, byte(indexInWord, word)))))\\n indexInWord := add(indexInWord, byte(0, mload(add(opcodeSkippableBytes, byte(indexInWord, word)))))\\n indexInWord := add(indexInWord, byte(0, mload(add(opcodeSkippableBytes, byte(indexInWord, word)))))\\n indexInWord := add(indexInWord, byte(0, mload(add(opcodeSkippableBytes, byte(indexInWord, word)))))\\n _pc := add(_pc, indexInWord)\\n\\n opNum := byte(indexInWord, word)\\n }\\n\\n // + push opcodes\\n // + stop opcodes [STOP(0x00),JUMP(0x56),RETURN(0xf3),INVALID(0xfe)]\\n // + caller opcode CALLER(0x33)\\n // + blacklisted opcodes\\n uint256 opBit = 1 << opNum;\\n if (opBit & opcodeGateMask == 0) {\\n if (opBit & opcodePushMask == 0) {\\n // all pushes are valid opcodes\\n // subsequent bytes are not opcodes. Skip them.\\n _pc += (opNum - 0x5e); // PUSH1 is 0x60, so opNum-0x5f = PUSHed bytes and we +1 to\\n // skip the _pc++; line below in order to save gas ((-0x5f + 1) = -0x5e)\\n continue;\\n } else if (opBit & opcodeHaltingMask == 0) {\\n // STOP or JUMP or RETURN or INVALID (Note: REVERT is blacklisted, so not included here)\\n // We are now inside unreachable code until we hit a JUMPDEST!\\n do {\\n _pc++;\\n assembly {\\n opNum := byte(0, mload(_pc))\\n }\\n // encountered a JUMPDEST\\n if (opNum == 0x5b) break;\\n // skip PUSHed bytes\\n if ((1 << opNum) & opcodePushMask == 0) _pc += (opNum - 0x5f); // opNum-0x5f = PUSHed bytes (PUSH1 is 0x60)\\n } while (_pc < codeLength);\\n // opNum is 0x5b, so we don't continue here since the pc++ is fine\\n } else if (opNum == 0x33) { // Caller opcode\\n uint256 firstOps; // next 32 bytes of bytecode\\n uint256 secondOps; // following 32 bytes of bytecode\\n\\n assembly {\\n firstOps := mload(_pc)\\n // 37 bytes total, 5 left over --> 32 - 5 bytes = 27 bytes = 216 bits\\n secondOps := shr(216, mload(add(_pc, 0x20)))\\n }\\n\\n // Call identity precompile\\n // CALLER POP PUSH1 0x00 PUSH1 0x04 GAS CALL\\n // 32 - 8 bytes = 24 bytes = 192\\n if ((firstOps >> 192) == 0x3350600060045af1) {\\n _pc += 8;\\n // Call EM and abort execution if instructed\\n // CALLER PUSH1 0x00 SWAP1 GAS CALL PC PUSH1 0x0E ADD JUMPI RETURNDATASIZE PUSH1 0x00 DUP1 RETURNDATACOPY RETURNDATASIZE PUSH1 0x00 REVERT JUMPDEST RETURNDATASIZE PUSH1 0x01 EQ ISZERO PC PUSH1 0x0a ADD JUMPI PUSH1 0x01 PUSH1 0x00 RETURN JUMPDEST\\n } else if (firstOps == 0x336000905af158600e01573d6000803e3d6000fd5b3d6001141558600a015760 && secondOps == 0x016000f35b) {\\n _pc += 37;\\n } else {\\n return false;\\n }\\n continue;\\n } else {\\n // encountered a non-whitelisted opcode!\\n return false;\\n }\\n }\\n _pc++;\\n } while (_pc < codeLength);\\n return true;\\n }\\n}\\n\",\"keccak256\":\"0x44cd4fcdcb25a233fa98da5ba66706ce2f9fbf13359cf7f2891793739687a86f\",\"license\":\"MIT\"},\"contracts/optimistic-ethereum/iOVM/execution/iOVM_SafetyChecker.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\npragma solidity >0.5.0 <0.8.0;\\n\\n/**\\n * @title iOVM_SafetyChecker\\n */\\ninterface iOVM_SafetyChecker {\\n\\n /********************\\n * Public Functions *\\n ********************/\\n\\n function isBytecodeSafe(bytes calldata _bytecode) external pure returns (bool);\\n}\\n\",\"keccak256\":\"0xde6639676d4ec4f77297652d5ede2429bc93e74e11fefd9e9de4bc92dd784878\",\"license\":\"MIT\"}},\"version\":1}",
"bytecode": "0x608060405234801561001057600080fd5b50610373806100206000396000f3fe608060405234801561001057600080fd5b506004361061002b5760003560e01c8063a44eb59a14610030575b600080fd5b6100d66004803603602081101561004657600080fd5b81019060208101813564010000000081111561006157600080fd5b82018360208201111561007357600080fd5b8035906020019184600183028401116401000000008311171561009557600080fd5b91908080601f0160208091040260200160405190810160405280939291908181526020018383808284376000920191909152509295506100ea945050505050565b604080519115158252519081900360200190f35b60408051610100810182527e0101010101010101010101000000000101010101010101010101010101000081526b010101010101000000010100600160f81b016020808301919091526f0101010100000001010101010000000092820192909252630203040560e01b60608201527f0101010101010101010101010101010101010101010101010101010101010101608082015264010101010160d81b60a0820152600060c0820181905260e0820181905283519092741fffffffff000000000f8f000063f000013fff0ffe916a40000000000000000000026117ff60f31b039163ffffffff60601b1991870181019087015b8051600081811a880151811a82811a890151821a0182811a890151821a0182811a890151821a0182811a890151821a0182811a89015190911a01918201911a6001811b86811661032057808516610239575001605d1901610326565b80861661027e575b8280600101935050825160001a915081605b141561025e57610279565b6001821b851661027157918101605e1901915b838310610241575b610320565b816033141561030f578251602084015160d81c673350600060045af160c083901c14156102b057600885019450610306565b817f336000905af158600e01573d6000803e3d6000fd5b3d6001141558600a0157601480156102e357508064016000f35b145b156102f357602585019450610306565b60009a5050505050505050505050610338565b50505050610326565b600098505050505050505050610338565b50506001015b8181106101dd57600196505050505050505b91905056fea26469706673582212209a836b268dcf58167a9f65bb872e3ddb5bd93b231f6b456f1c5e6d75b92a746364736f6c63430007060033",
"deployedBytecode": "0x608060405234801561001057600080fd5b506004361061002b5760003560e01c8063a44eb59a14610030575b600080fd5b6100d66004803603602081101561004657600080fd5b81019060208101813564010000000081111561006157600080fd5b82018360208201111561007357600080fd5b8035906020019184600183028401116401000000008311171561009557600080fd5b91908080601f0160208091040260200160405190810160405280939291908181526020018383808284376000920191909152509295506100ea945050505050565b604080519115158252519081900360200190f35b60408051610100810182527e0101010101010101010101000000000101010101010101010101010101000081526b010101010101000000010100600160f81b016020808301919091526f0101010100000001010101010000000092820192909252630203040560e01b60608201527f0101010101010101010101010101010101010101010101010101010101010101608082015264010101010160d81b60a0820152600060c0820181905260e0820181905283519092741fffffffff000000000f8f000063f000013fff0ffe916a40000000000000000000026117ff60f31b039163ffffffff60601b1991870181019087015b8051600081811a880151811a82811a890151821a0182811a890151821a0182811a890151821a0182811a890151821a0182811a89015190911a01918201911a6001811b86811661032057808516610239575001605d1901610326565b80861661027e575b8280600101935050825160001a915081605b141561025e57610279565b6001821b851661027157918101605e1901915b838310610241575b610320565b816033141561030f578251602084015160d81c673350600060045af160c083901c14156102b057600885019450610306565b817f336000905af158600e01573d6000803e3d6000fd5b3d6001141558600a0157601480156102e357508064016000f35b145b156102f357602585019450610306565b60009a5050505050505050505050610338565b50505050610326565b600098505050505050505050610338565b50506001015b8181106101dd57600196505050505050505b91905056fea26469706673582212209a836b268dcf58167a9f65bb872e3ddb5bd93b231f6b456f1c5e6d75b92a746364736f6c63430007060033",
"devdoc": {
"details": "The Safety Checker verifies that contracts deployed on L2 do not contain any \"unsafe\" operations. An operation is considered unsafe if it would access state variables which are specific to the environment (ie. L1 or L2) in which it is executed, as this could be used to \"escape the sandbox\" of the OVM, resulting in non-deterministic fraud proofs. That is, an attacker would be able to \"prove fraud\" on an honestly applied transaction. Note that a \"safe\" contract requires opcodes to appear in a particular pattern; omission of \"unsafe\" opcodes is necessary, but not sufficient. Compiler used: solc Runtime target: EVM",
"kind": "dev",
......
This source diff could not be displayed because it is too large. You can view the blob instead.
This source diff could not be displayed because it is too large. You can view the blob instead.
This source diff could not be displayed because it is too large. You can view the blob instead.
{
"address": "0xD1EC7d40CCd01EB7A305b94cBa8AB6D17f6a9eFE",
"address": "0x902e5fF5A99C4eC1C21bbab089fdabE32EF0A5DF",
"abi": [
{
"inputs": [
......@@ -22,30 +22,30 @@
"type": "fallback"
}
],
"transactionHash": "0x640ba4de000f47e64d38bef4caa3a16ef9332340aa01accd0aed27d5b4f04ea5",
"transactionHash": "0xe198de44f75246ee2a816da72ac4da1b4d9481176a414783acd928e3738434b7",
"receipt": {
"to": null,
"from": "0x77C4c8f491e5ff22a2C0E18b005c3BA0Fe36c1Bc",
"contractAddress": "0xD1EC7d40CCd01EB7A305b94cBa8AB6D17f6a9eFE",
"transactionIndex": 96,
"gasUsed": "213556",
"from": "0xd033f09cB85621F98F7A84C64dB381ac16Eff818",
"contractAddress": "0x902e5fF5A99C4eC1C21bbab089fdabE32EF0A5DF",
"transactionIndex": 294,
"gasUsed": "225024",
"logsBloom": "0x00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000",
"blockHash": "0xd33ffebe1a0e1651e29fb1331efc57b4546093d98c9b6e5bf2b1b6c5efc6094d",
"transactionHash": "0x640ba4de000f47e64d38bef4caa3a16ef9332340aa01accd0aed27d5b4f04ea5",
"blockHash": "0x62326c55decffcda8c36fab59693824c82c0f9ab5b90b76ed88c5090ae926052",
"transactionHash": "0xe198de44f75246ee2a816da72ac4da1b4d9481176a414783acd928e3738434b7",
"logs": [],
"blockNumber": 12207818,
"cumulativeGasUsed": "6886723",
"blockNumber": 12410833,
"cumulativeGasUsed": "11217568",
"status": 1,
"byzantium": true
},
"args": [
"0xd3EeD86464Ff13B4BFD81a3bB1e753b7ceBA3A39",
"0x668E5b997b9aE88a56cd40409119d4Db9e6d752E",
"OVM_L1CrossDomainMessenger"
],
"solcInputHash": "43ee6bb8ef92595aa6d0e22a6c464dff",
"metadata": "{\"compiler\":{\"version\":\"0.7.6+commit.7338295f\"},\"language\":\"Solidity\",\"output\":{\"abi\":[{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_libAddressManager\",\"type\":\"address\"},{\"internalType\":\"string\",\"name\":\"_implementationName\",\"type\":\"string\"}],\"stateMutability\":\"nonpayable\",\"type\":\"constructor\"},{\"stateMutability\":\"payable\",\"type\":\"fallback\"}],\"devdoc\":{\"kind\":\"dev\",\"methods\":{\"constructor\":{\"params\":{\"_implementationName\":\"implementationName of the contract to proxy to.\",\"_libAddressManager\":\"Address of the Lib_AddressManager.\"}}},\"title\":\"Lib_ResolvedDelegateProxy\",\"version\":1},\"userdoc\":{\"kind\":\"user\",\"methods\":{},\"version\":1}},\"settings\":{\"compilationTarget\":{\"contracts/optimistic-ethereum/libraries/resolver/Lib_ResolvedDelegateProxy.sol\":\"Lib_ResolvedDelegateProxy\"},\"evmVersion\":\"istanbul\",\"libraries\":{},\"metadata\":{\"bytecodeHash\":\"none\",\"useLiteralContent\":true},\"optimizer\":{\"enabled\":true,\"runs\":200},\"remappings\":[]},\"sources\":{\"contracts/optimistic-ethereum/libraries/resolver/Lib_AddressManager.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\npragma solidity >0.5.0 <0.8.0;\\n\\n/* Contract Imports */\\nimport { Ownable } from \\\"./Lib_Ownable.sol\\\";\\n\\n/**\\n * @title Lib_AddressManager\\n */\\ncontract Lib_AddressManager is Ownable {\\n\\n /**********\\n * Events *\\n **********/\\n\\n event AddressSet(\\n string _name,\\n address _newAddress\\n );\\n\\n /*******************************************\\n * Contract Variables: Internal Accounting *\\n *******************************************/\\n\\n mapping (bytes32 => address) private addresses;\\n\\n\\n /********************\\n * Public Functions *\\n ********************/\\n\\n function setAddress(\\n string memory _name,\\n address _address\\n )\\n public\\n onlyOwner\\n {\\n emit AddressSet(_name, _address);\\n addresses[_getNameHash(_name)] = _address;\\n }\\n\\n function getAddress(\\n string memory _name\\n )\\n public\\n view\\n returns (address)\\n {\\n return addresses[_getNameHash(_name)];\\n }\\n\\n\\n /**********************\\n * Internal Functions *\\n **********************/\\n\\n function _getNameHash(\\n string memory _name\\n )\\n internal\\n pure\\n returns (\\n bytes32 _hash\\n )\\n {\\n return keccak256(abi.encodePacked(_name));\\n }\\n}\\n\",\"keccak256\":\"0x3a490595cc21ff170e4027843093670ff845d5972481fbfb956b722ea564bb06\",\"license\":\"MIT\"},\"contracts/optimistic-ethereum/libraries/resolver/Lib_Ownable.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\npragma solidity >0.5.0 <0.8.0;\\n\\n/**\\n * @title Ownable\\n * @dev Adapted from https://github.com/OpenZeppelin/openzeppelin-contracts/blob/master/contracts/access/Ownable.sol\\n */\\nabstract contract Ownable {\\n\\n /*************\\n * Variables *\\n *************/\\n\\n address public owner;\\n\\n\\n /**********\\n * Events *\\n **********/\\n\\n event OwnershipTransferred(\\n address indexed previousOwner,\\n address indexed newOwner\\n );\\n\\n\\n /***************\\n * Constructor *\\n ***************/\\n\\n constructor() {\\n owner = msg.sender;\\n emit OwnershipTransferred(address(0), owner);\\n }\\n\\n\\n /**********************\\n * Function Modifiers *\\n **********************/\\n\\n modifier onlyOwner() {\\n require(\\n owner == msg.sender,\\n \\\"Ownable: caller is not the owner\\\"\\n );\\n _;\\n }\\n\\n\\n /********************\\n * Public Functions *\\n ********************/\\n\\n function renounceOwnership()\\n public\\n virtual\\n onlyOwner\\n {\\n emit OwnershipTransferred(owner, address(0));\\n owner = address(0);\\n }\\n\\n function transferOwnership(address _newOwner)\\n public\\n virtual\\n onlyOwner\\n {\\n require(\\n _newOwner != address(0),\\n \\\"Ownable: new owner cannot be the zero address\\\"\\n );\\n\\n emit OwnershipTransferred(owner, _newOwner);\\n owner = _newOwner;\\n }\\n}\\n\",\"keccak256\":\"0xd9dfd9264e5b5fedd53a5b10fdf179c3f367614b0fe69179bce4e45119f5b739\",\"license\":\"MIT\"},\"contracts/optimistic-ethereum/libraries/resolver/Lib_ResolvedDelegateProxy.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\npragma solidity >0.5.0 <0.8.0;\\n\\n/* Library Imports */\\nimport { Lib_AddressManager } from \\\"./Lib_AddressManager.sol\\\";\\n\\n/**\\n * @title Lib_ResolvedDelegateProxy\\n */\\ncontract Lib_ResolvedDelegateProxy {\\n\\n /*************\\n * Variables *\\n *************/\\n\\n // Using mappings to store fields to avoid overwriting storage slots in the\\n // implementation contract. For example, instead of storing these fields at\\n // storage slot `0` & `1`, they are stored at `keccak256(key + slot)`.\\n // See: https://solidity.readthedocs.io/en/v0.7.0/internals/layout_in_storage.html\\n // NOTE: Do not use this code in your own contract system. \\n // There is a known flaw in this contract, and we will remove it from the repository\\n // in the near future. Due to the very limited way that we are using it, this flaw is\\n // not an issue in our system. \\n mapping (address => string) private implementationName;\\n mapping (address => Lib_AddressManager) private addressManager;\\n\\n\\n /***************\\n * Constructor *\\n ***************/\\n\\n /**\\n * @param _libAddressManager Address of the Lib_AddressManager.\\n * @param _implementationName implementationName of the contract to proxy to.\\n */\\n constructor(\\n address _libAddressManager,\\n string memory _implementationName\\n )\\n {\\n addressManager[address(this)] = Lib_AddressManager(_libAddressManager);\\n implementationName[address(this)] = _implementationName;\\n }\\n\\n\\n /*********************\\n * Fallback Function *\\n *********************/\\n\\n fallback()\\n external\\n payable\\n {\\n address target = addressManager[address(this)].getAddress(\\n (implementationName[address(this)])\\n );\\n\\n require(\\n target != address(0),\\n \\\"Target address must be initialized.\\\"\\n );\\n\\n (bool success, bytes memory returndata) = target.delegatecall(msg.data);\\n\\n if (success == true) {\\n assembly {\\n return(add(returndata, 0x20), mload(returndata))\\n }\\n } else {\\n assembly {\\n revert(add(returndata, 0x20), mload(returndata))\\n }\\n }\\n }\\n}\\n\",\"keccak256\":\"0x48ec601665fb10424fc0afbf0b288e123be72eaf5faecb5c440609d176b645a7\",\"license\":\"MIT\"}},\"version\":1}",
"bytecode": "0x608060405234801561001057600080fd5b506040516103df3803806103df8339818101604052604081101561003357600080fd5b81516020830180516040519294929383019291908464010000000082111561005a57600080fd5b90830190602082018581111561006f57600080fd5b825164010000000081118282018810171561008957600080fd5b82525081516020918201929091019080838360005b838110156100b657818101518382015260200161009e565b50505050905090810190601f1680156100e35780820380516001836020036101000a031916815260200191505b5060409081523060009081526001602090815282822080546001600160a01b0319166001600160a01b038a16179055818152919020855161012c95509093509085019150610134565b5050506101d5565b828054600181600116156101000203166002900490600052602060002090601f01602090048101928261016a57600085556101b0565b82601f1061018357805160ff19168380011785556101b0565b828001600101855582156101b0579182015b828111156101b0578251825591602001919060010190610195565b506101bc9291506101c0565b5090565b5b808211156101bc57600081556001016101c1565b6101fb806101e46000396000f3fe60806040818152306000908152600160208181528383205483825293832063bf40fac160e01b909552608490815284546002610100938216159390930260001901169190910460a481905291936001600160a01b039093169263bf40fac192909190819060c490849080156100b55780601f1061008a576101008083540402835291602001916100b5565b820191906000526020600020905b81548152906001019060200180831161009857829003601f168201915b50509250505060206040518083038186803b1580156100d357600080fd5b505afa1580156100e7573d6000803e3d6000fd5b505050506040513d60208110156100fd57600080fd5b505190506001600160a01b0381166101465760405162461bcd60e51b81526004018080602001828103825260238152602001806101cc6023913960400191505060405180910390fd5b600080826001600160a01b03166000366040518083838082843760405192019450600093509091505080830381855af49150503d80600081146101a5576040519150601f19603f3d011682016040523d82523d6000602084013e6101aa565b606091505b509092509050600182151514156101c357805160208201f35b805160208201fdfe5461726765742061646472657373206d75737420626520696e697469616c697a65642ea164736f6c6343000706000a",
"deployedBytecode": "0x60806040818152306000908152600160208181528383205483825293832063bf40fac160e01b909552608490815284546002610100938216159390930260001901169190910460a481905291936001600160a01b039093169263bf40fac192909190819060c490849080156100b55780601f1061008a576101008083540402835291602001916100b5565b820191906000526020600020905b81548152906001019060200180831161009857829003601f168201915b50509250505060206040518083038186803b1580156100d357600080fd5b505afa1580156100e7573d6000803e3d6000fd5b505050506040513d60208110156100fd57600080fd5b505190506001600160a01b0381166101465760405162461bcd60e51b81526004018080602001828103825260238152602001806101cc6023913960400191505060405180910390fd5b600080826001600160a01b03166000366040518083838082843760405192019450600093509091505080830381855af49150503d80600081146101a5576040519150601f19603f3d011682016040523d82523d6000602084013e6101aa565b606091505b509092509050600182151514156101c357805160208201f35b805160208201fdfe5461726765742061646472657373206d75737420626520696e697469616c697a65642ea164736f6c6343000706000a",
"solcInputHash": "f2bdab652d5102f5f11e78dae866798d",
"metadata": "{\"compiler\":{\"version\":\"0.7.6+commit.7338295f\"},\"language\":\"Solidity\",\"output\":{\"abi\":[{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_libAddressManager\",\"type\":\"address\"},{\"internalType\":\"string\",\"name\":\"_implementationName\",\"type\":\"string\"}],\"stateMutability\":\"nonpayable\",\"type\":\"constructor\"},{\"stateMutability\":\"payable\",\"type\":\"fallback\"}],\"devdoc\":{\"kind\":\"dev\",\"methods\":{\"constructor\":{\"params\":{\"_implementationName\":\"implementationName of the contract to proxy to.\",\"_libAddressManager\":\"Address of the Lib_AddressManager.\"}}},\"title\":\"Lib_ResolvedDelegateProxy\",\"version\":1},\"userdoc\":{\"kind\":\"user\",\"methods\":{},\"version\":1}},\"settings\":{\"compilationTarget\":{\"contracts/optimistic-ethereum/libraries/resolver/Lib_ResolvedDelegateProxy.sol\":\"Lib_ResolvedDelegateProxy\"},\"evmVersion\":\"istanbul\",\"libraries\":{},\"metadata\":{\"bytecodeHash\":\"ipfs\",\"useLiteralContent\":true},\"optimizer\":{\"enabled\":true,\"runs\":200},\"remappings\":[]},\"sources\":{\"@openzeppelin/contracts/access/Ownable.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity >=0.6.0 <0.8.0;\\n\\nimport \\\"../utils/Context.sol\\\";\\n/**\\n * @dev Contract module which provides a basic access control mechanism, where\\n * there is an account (an owner) that can be granted exclusive access to\\n * specific functions.\\n *\\n * By default, the owner account will be the one that deploys the contract. This\\n * can later be changed with {transferOwnership}.\\n *\\n * This module is used through inheritance. It will make available the modifier\\n * `onlyOwner`, which can be applied to your functions to restrict their use to\\n * the owner.\\n */\\nabstract contract Ownable is Context {\\n address private _owner;\\n\\n event OwnershipTransferred(address indexed previousOwner, address indexed newOwner);\\n\\n /**\\n * @dev Initializes the contract setting the deployer as the initial owner.\\n */\\n constructor () internal {\\n address msgSender = _msgSender();\\n _owner = msgSender;\\n emit OwnershipTransferred(address(0), msgSender);\\n }\\n\\n /**\\n * @dev Returns the address of the current owner.\\n */\\n function owner() public view virtual returns (address) {\\n return _owner;\\n }\\n\\n /**\\n * @dev Throws if called by any account other than the owner.\\n */\\n modifier onlyOwner() {\\n require(owner() == _msgSender(), \\\"Ownable: caller is not the owner\\\");\\n _;\\n }\\n\\n /**\\n * @dev Leaves the contract without owner. It will not be possible to call\\n * `onlyOwner` functions anymore. Can only be called by the current owner.\\n *\\n * NOTE: Renouncing ownership will leave the contract without an owner,\\n * thereby removing any functionality that is only available to the owner.\\n */\\n function renounceOwnership() public virtual onlyOwner {\\n emit OwnershipTransferred(_owner, address(0));\\n _owner = address(0);\\n }\\n\\n /**\\n * @dev Transfers ownership of the contract to a new account (`newOwner`).\\n * Can only be called by the current owner.\\n */\\n function transferOwnership(address newOwner) public virtual onlyOwner {\\n require(newOwner != address(0), \\\"Ownable: new owner is the zero address\\\");\\n emit OwnershipTransferred(_owner, newOwner);\\n _owner = newOwner;\\n }\\n}\\n\",\"keccak256\":\"0x15e2d5bd4c28a88548074c54d220e8086f638a71ed07e6b3ba5a70066fcf458d\",\"license\":\"MIT\"},\"@openzeppelin/contracts/utils/Context.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity >=0.6.0 <0.8.0;\\n\\n/*\\n * @dev Provides information about the current execution context, including the\\n * sender of the transaction and its data. While these are generally available\\n * via msg.sender and msg.data, they should not be accessed in such a direct\\n * manner, since when dealing with GSN meta-transactions the account sending and\\n * paying for execution may not be the actual sender (as far as an application\\n * is concerned).\\n *\\n * This contract is only required for intermediate, library-like contracts.\\n */\\nabstract contract Context {\\n function _msgSender() internal view virtual returns (address payable) {\\n return msg.sender;\\n }\\n\\n function _msgData() internal view virtual returns (bytes memory) {\\n this; // silence state mutability warning without generating bytecode - see https://github.com/ethereum/solidity/issues/2691\\n return msg.data;\\n }\\n}\\n\",\"keccak256\":\"0x8d3cb350f04ff49cfb10aef08d87f19dcbaecc8027b0bed12f3275cd12f38cf0\",\"license\":\"MIT\"},\"contracts/optimistic-ethereum/libraries/resolver/Lib_AddressManager.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\npragma solidity >0.5.0 <0.8.0;\\n\\n/* External Imports */\\nimport { Ownable } from \\\"@openzeppelin/contracts/access/Ownable.sol\\\";\\n\\n/**\\n * @title Lib_AddressManager\\n */\\ncontract Lib_AddressManager is Ownable {\\n\\n /**********\\n * Events *\\n **********/\\n\\n event AddressSet(\\n string _name,\\n address _newAddress\\n );\\n\\n\\n /*************\\n * Variables *\\n *************/\\n\\n mapping (bytes32 => address) private addresses;\\n\\n\\n /********************\\n * Public Functions *\\n ********************/\\n\\n /**\\n * Changes the address associated with a particular name.\\n * @param _name String name to associate an address with.\\n * @param _address Address to associate with the name.\\n */\\n function setAddress(\\n string memory _name,\\n address _address\\n )\\n external\\n onlyOwner\\n {\\n addresses[_getNameHash(_name)] = _address;\\n\\n emit AddressSet(\\n _name,\\n _address\\n );\\n }\\n\\n /**\\n * Retrieves the address associated with a given name.\\n * @param _name Name to retrieve an address for.\\n * @return Address associated with the given name.\\n */\\n function getAddress(\\n string memory _name\\n )\\n external\\n view\\n returns (\\n address\\n )\\n {\\n return addresses[_getNameHash(_name)];\\n }\\n\\n\\n /**********************\\n * Internal Functions *\\n **********************/\\n\\n /**\\n * Computes the hash of a name.\\n * @param _name Name to compute a hash for.\\n * @return Hash of the given name.\\n */\\n function _getNameHash(\\n string memory _name\\n )\\n internal\\n pure\\n returns (\\n bytes32\\n )\\n {\\n return keccak256(abi.encodePacked(_name));\\n }\\n}\\n\",\"keccak256\":\"0xcc9fc5c64f1101a5c6c397594086b1608189a9edc5c9635e1ac38f70aeeeecbf\",\"license\":\"MIT\"},\"contracts/optimistic-ethereum/libraries/resolver/Lib_ResolvedDelegateProxy.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\npragma solidity >0.5.0 <0.8.0;\\n\\n/* Library Imports */\\nimport { Lib_AddressManager } from \\\"./Lib_AddressManager.sol\\\";\\n\\n/**\\n * @title Lib_ResolvedDelegateProxy\\n */\\ncontract Lib_ResolvedDelegateProxy {\\n\\n /*************\\n * Variables *\\n *************/\\n\\n // Using mappings to store fields to avoid overwriting storage slots in the\\n // implementation contract. For example, instead of storing these fields at\\n // storage slot `0` & `1`, they are stored at `keccak256(key + slot)`.\\n // See: https://solidity.readthedocs.io/en/v0.7.0/internals/layout_in_storage.html\\n // NOTE: Do not use this code in your own contract system.\\n // There is a known flaw in this contract, and we will remove it from the repository\\n // in the near future. Due to the very limited way that we are using it, this flaw is\\n // not an issue in our system.\\n mapping (address => string) private implementationName;\\n mapping (address => Lib_AddressManager) private addressManager;\\n\\n\\n /***************\\n * Constructor *\\n ***************/\\n\\n /**\\n * @param _libAddressManager Address of the Lib_AddressManager.\\n * @param _implementationName implementationName of the contract to proxy to.\\n */\\n constructor(\\n address _libAddressManager,\\n string memory _implementationName\\n ) {\\n addressManager[address(this)] = Lib_AddressManager(_libAddressManager);\\n implementationName[address(this)] = _implementationName;\\n }\\n\\n\\n /*********************\\n * Fallback Function *\\n *********************/\\n\\n fallback()\\n external\\n payable\\n {\\n address target = addressManager[address(this)].getAddress(\\n (implementationName[address(this)])\\n );\\n\\n require(\\n target != address(0),\\n \\\"Target address must be initialized.\\\"\\n );\\n\\n (bool success, bytes memory returndata) = target.delegatecall(msg.data);\\n\\n if (success == true) {\\n assembly {\\n return(add(returndata, 0x20), mload(returndata))\\n }\\n } else {\\n assembly {\\n revert(add(returndata, 0x20), mload(returndata))\\n }\\n }\\n }\\n}\\n\",\"keccak256\":\"0xfaecb051b37f1d87d588cafb17a575723cbdf7c3c2079772110f33e747e05027\",\"license\":\"MIT\"}},\"version\":1}",
"bytecode": "0x608060405234801561001057600080fd5b506040516104083803806104088339818101604052604081101561003357600080fd5b81516020830180516040519294929383019291908464010000000082111561005a57600080fd5b90830190602082018581111561006f57600080fd5b825164010000000081118282018810171561008957600080fd5b82525081516020918201929091019080838360005b838110156100b657818101518382015260200161009e565b50505050905090810190601f1680156100e35780820380516001836020036101000a031916815260200191505b5060409081523060009081526001602090815282822080546001600160a01b0319166001600160a01b038a16179055818152919020855161012c95509093509085019150610134565b5050506101d5565b828054600181600116156101000203166002900490600052602060002090601f01602090048101928261016a57600085556101b0565b82601f1061018357805160ff19168380011785556101b0565b828001600101855582156101b0579182015b828111156101b0578251825591602001919060010190610195565b506101bc9291506101c0565b5090565b5b808211156101bc57600081556001016101c1565b610224806101e46000396000f3fe60806040818152306000908152600160208181528383205483825293832063bf40fac160e01b909552608490815284546002610100938216159390930260001901169190910460a481905291936001600160a01b039093169263bf40fac192909190819060c490849080156100b55780601f1061008a576101008083540402835291602001916100b5565b820191906000526020600020905b81548152906001019060200180831161009857829003601f168201915b50509250505060206040518083038186803b1580156100d357600080fd5b505afa1580156100e7573d6000803e3d6000fd5b505050506040513d60208110156100fd57600080fd5b505190506001600160a01b0381166101465760405162461bcd60e51b81526004018080602001828103825260238152602001806101cc6023913960400191505060405180910390fd5b600080826001600160a01b03166000366040518083838082843760405192019450600093509091505080830381855af49150503d80600081146101a5576040519150601f19603f3d011682016040523d82523d6000602084013e6101aa565b606091505b509092509050600182151514156101c357805160208201f35b805160208201fdfe5461726765742061646472657373206d75737420626520696e697469616c697a65642ea2646970667358221220ceebc7fc0b8eea3f2d3758756655b8c39c79670618f167c7b41c2b40b2e41b0964736f6c63430007060033",
"deployedBytecode": "0x60806040818152306000908152600160208181528383205483825293832063bf40fac160e01b909552608490815284546002610100938216159390930260001901169190910460a481905291936001600160a01b039093169263bf40fac192909190819060c490849080156100b55780601f1061008a576101008083540402835291602001916100b5565b820191906000526020600020905b81548152906001019060200180831161009857829003601f168201915b50509250505060206040518083038186803b1580156100d357600080fd5b505afa1580156100e7573d6000803e3d6000fd5b505050506040513d60208110156100fd57600080fd5b505190506001600160a01b0381166101465760405162461bcd60e51b81526004018080602001828103825260238152602001806101cc6023913960400191505060405180910390fd5b600080826001600160a01b03166000366040518083838082843760405192019450600093509091505080830381855af49150503d80600081146101a5576040519150601f19603f3d011682016040523d82523d6000602084013e6101aa565b606091505b509092509050600182151514156101c357805160208201f35b805160208201fdfe5461726765742061646472657373206d75737420626520696e697469616c697a65642ea2646970667358221220ceebc7fc0b8eea3f2d3758756655b8c39c79670618f167c7b41c2b40b2e41b0964736f6c63430007060033",
"devdoc": {
"kind": "dev",
"methods": {
......@@ -67,7 +67,7 @@
"storageLayout": {
"storage": [
{
"astId": 12679,
"astId": 12893,
"contract": "contracts/optimistic-ethereum/libraries/resolver/Lib_ResolvedDelegateProxy.sol:Lib_ResolvedDelegateProxy",
"label": "implementationName",
"offset": 0,
......@@ -75,12 +75,12 @@
"type": "t_mapping(t_address,t_string_storage)"
},
{
"astId": 12683,
"astId": 12897,
"contract": "contracts/optimistic-ethereum/libraries/resolver/Lib_ResolvedDelegateProxy.sol:Lib_ResolvedDelegateProxy",
"label": "addressManager",
"offset": 0,
"slot": "1",
"type": "t_mapping(t_address,t_contract(Lib_AddressManager)12547)"
"type": "t_mapping(t_address,t_contract(Lib_AddressManager)12849)"
}
],
"types": {
......@@ -89,17 +89,17 @@
"label": "address",
"numberOfBytes": "20"
},
"t_contract(Lib_AddressManager)12547": {
"t_contract(Lib_AddressManager)12849": {
"encoding": "inplace",
"label": "contract Lib_AddressManager",
"numberOfBytes": "20"
},
"t_mapping(t_address,t_contract(Lib_AddressManager)12547)": {
"t_mapping(t_address,t_contract(Lib_AddressManager)12849)": {
"encoding": "mapping",
"key": "t_address",
"label": "mapping(address => contract Lib_AddressManager)",
"numberOfBytes": "32",
"value": "t_contract(Lib_AddressManager)12547"
"value": "t_contract(Lib_AddressManager)12849"
},
"t_mapping(t_address,t_string_storage)": {
"encoding": "mapping",
......
{
"address": "0xF20C38fCdDF0C790319Fd7431d17ea0c2bC9959c",
"address": "0xe681F80966a8b1fFadECf8068bD6F99034791c95",
"abi": [
{
"inputs": [
......@@ -22,30 +22,30 @@
"type": "fallback"
}
],
"transactionHash": "0x4cecb2f632310c09a8281c8545e25e587f22de10b4522abf0bd61d50eeb8170e",
"transactionHash": "0x7734ee79863cabbe3587b8817b53cdad9a8c642c0df1a76e629d04cc0f796d27",
"receipt": {
"to": null,
"from": "0x77C4c8f491e5ff22a2C0E18b005c3BA0Fe36c1Bc",
"contractAddress": "0xF20C38fCdDF0C790319Fd7431d17ea0c2bC9959c",
"transactionIndex": 110,
"gasUsed": "213436",
"from": "0xd033f09cB85621F98F7A84C64dB381ac16Eff818",
"contractAddress": "0xe681F80966a8b1fFadECf8068bD6F99034791c95",
"transactionIndex": 111,
"gasUsed": "224904",
"logsBloom": "0x00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000",
"blockHash": "0x1e060e1668626f1ef230f6c183e739d1b98f5c439243eda9ef970e287493dcdd",
"transactionHash": "0x4cecb2f632310c09a8281c8545e25e587f22de10b4522abf0bd61d50eeb8170e",
"blockHash": "0xd2198877ffc22d8735ee15be1c92e4e7923af6048b0cbe6308b2e38ffe8bf0d8",
"transactionHash": "0x7734ee79863cabbe3587b8817b53cdad9a8c642c0df1a76e629d04cc0f796d27",
"logs": [],
"blockNumber": 12208129,
"cumulativeGasUsed": "7794906",
"blockNumber": 12410958,
"cumulativeGasUsed": "6370527",
"status": 1,
"byzantium": true
},
"args": [
"0xd3EeD86464Ff13B4BFD81a3bB1e753b7ceBA3A39",
"0x668E5b997b9aE88a56cd40409119d4Db9e6d752E",
"OVM_L1ETHGateway"
],
"solcInputHash": "43ee6bb8ef92595aa6d0e22a6c464dff",
"metadata": "{\"compiler\":{\"version\":\"0.7.6+commit.7338295f\"},\"language\":\"Solidity\",\"output\":{\"abi\":[{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_libAddressManager\",\"type\":\"address\"},{\"internalType\":\"string\",\"name\":\"_implementationName\",\"type\":\"string\"}],\"stateMutability\":\"nonpayable\",\"type\":\"constructor\"},{\"stateMutability\":\"payable\",\"type\":\"fallback\"}],\"devdoc\":{\"kind\":\"dev\",\"methods\":{\"constructor\":{\"params\":{\"_implementationName\":\"implementationName of the contract to proxy to.\",\"_libAddressManager\":\"Address of the Lib_AddressManager.\"}}},\"title\":\"Lib_ResolvedDelegateProxy\",\"version\":1},\"userdoc\":{\"kind\":\"user\",\"methods\":{},\"version\":1}},\"settings\":{\"compilationTarget\":{\"contracts/optimistic-ethereum/libraries/resolver/Lib_ResolvedDelegateProxy.sol\":\"Lib_ResolvedDelegateProxy\"},\"evmVersion\":\"istanbul\",\"libraries\":{},\"metadata\":{\"bytecodeHash\":\"none\",\"useLiteralContent\":true},\"optimizer\":{\"enabled\":true,\"runs\":200},\"remappings\":[]},\"sources\":{\"contracts/optimistic-ethereum/libraries/resolver/Lib_AddressManager.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\npragma solidity >0.5.0 <0.8.0;\\n\\n/* Contract Imports */\\nimport { Ownable } from \\\"./Lib_Ownable.sol\\\";\\n\\n/**\\n * @title Lib_AddressManager\\n */\\ncontract Lib_AddressManager is Ownable {\\n\\n /**********\\n * Events *\\n **********/\\n\\n event AddressSet(\\n string _name,\\n address _newAddress\\n );\\n\\n /*******************************************\\n * Contract Variables: Internal Accounting *\\n *******************************************/\\n\\n mapping (bytes32 => address) private addresses;\\n\\n\\n /********************\\n * Public Functions *\\n ********************/\\n\\n function setAddress(\\n string memory _name,\\n address _address\\n )\\n public\\n onlyOwner\\n {\\n emit AddressSet(_name, _address);\\n addresses[_getNameHash(_name)] = _address;\\n }\\n\\n function getAddress(\\n string memory _name\\n )\\n public\\n view\\n returns (address)\\n {\\n return addresses[_getNameHash(_name)];\\n }\\n\\n\\n /**********************\\n * Internal Functions *\\n **********************/\\n\\n function _getNameHash(\\n string memory _name\\n )\\n internal\\n pure\\n returns (\\n bytes32 _hash\\n )\\n {\\n return keccak256(abi.encodePacked(_name));\\n }\\n}\\n\",\"keccak256\":\"0x3a490595cc21ff170e4027843093670ff845d5972481fbfb956b722ea564bb06\",\"license\":\"MIT\"},\"contracts/optimistic-ethereum/libraries/resolver/Lib_Ownable.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\npragma solidity >0.5.0 <0.8.0;\\n\\n/**\\n * @title Ownable\\n * @dev Adapted from https://github.com/OpenZeppelin/openzeppelin-contracts/blob/master/contracts/access/Ownable.sol\\n */\\nabstract contract Ownable {\\n\\n /*************\\n * Variables *\\n *************/\\n\\n address public owner;\\n\\n\\n /**********\\n * Events *\\n **********/\\n\\n event OwnershipTransferred(\\n address indexed previousOwner,\\n address indexed newOwner\\n );\\n\\n\\n /***************\\n * Constructor *\\n ***************/\\n\\n constructor() {\\n owner = msg.sender;\\n emit OwnershipTransferred(address(0), owner);\\n }\\n\\n\\n /**********************\\n * Function Modifiers *\\n **********************/\\n\\n modifier onlyOwner() {\\n require(\\n owner == msg.sender,\\n \\\"Ownable: caller is not the owner\\\"\\n );\\n _;\\n }\\n\\n\\n /********************\\n * Public Functions *\\n ********************/\\n\\n function renounceOwnership()\\n public\\n virtual\\n onlyOwner\\n {\\n emit OwnershipTransferred(owner, address(0));\\n owner = address(0);\\n }\\n\\n function transferOwnership(address _newOwner)\\n public\\n virtual\\n onlyOwner\\n {\\n require(\\n _newOwner != address(0),\\n \\\"Ownable: new owner cannot be the zero address\\\"\\n );\\n\\n emit OwnershipTransferred(owner, _newOwner);\\n owner = _newOwner;\\n }\\n}\\n\",\"keccak256\":\"0xd9dfd9264e5b5fedd53a5b10fdf179c3f367614b0fe69179bce4e45119f5b739\",\"license\":\"MIT\"},\"contracts/optimistic-ethereum/libraries/resolver/Lib_ResolvedDelegateProxy.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\npragma solidity >0.5.0 <0.8.0;\\n\\n/* Library Imports */\\nimport { Lib_AddressManager } from \\\"./Lib_AddressManager.sol\\\";\\n\\n/**\\n * @title Lib_ResolvedDelegateProxy\\n */\\ncontract Lib_ResolvedDelegateProxy {\\n\\n /*************\\n * Variables *\\n *************/\\n\\n // Using mappings to store fields to avoid overwriting storage slots in the\\n // implementation contract. For example, instead of storing these fields at\\n // storage slot `0` & `1`, they are stored at `keccak256(key + slot)`.\\n // See: https://solidity.readthedocs.io/en/v0.7.0/internals/layout_in_storage.html\\n // NOTE: Do not use this code in your own contract system. \\n // There is a known flaw in this contract, and we will remove it from the repository\\n // in the near future. Due to the very limited way that we are using it, this flaw is\\n // not an issue in our system. \\n mapping (address => string) private implementationName;\\n mapping (address => Lib_AddressManager) private addressManager;\\n\\n\\n /***************\\n * Constructor *\\n ***************/\\n\\n /**\\n * @param _libAddressManager Address of the Lib_AddressManager.\\n * @param _implementationName implementationName of the contract to proxy to.\\n */\\n constructor(\\n address _libAddressManager,\\n string memory _implementationName\\n )\\n {\\n addressManager[address(this)] = Lib_AddressManager(_libAddressManager);\\n implementationName[address(this)] = _implementationName;\\n }\\n\\n\\n /*********************\\n * Fallback Function *\\n *********************/\\n\\n fallback()\\n external\\n payable\\n {\\n address target = addressManager[address(this)].getAddress(\\n (implementationName[address(this)])\\n );\\n\\n require(\\n target != address(0),\\n \\\"Target address must be initialized.\\\"\\n );\\n\\n (bool success, bytes memory returndata) = target.delegatecall(msg.data);\\n\\n if (success == true) {\\n assembly {\\n return(add(returndata, 0x20), mload(returndata))\\n }\\n } else {\\n assembly {\\n revert(add(returndata, 0x20), mload(returndata))\\n }\\n }\\n }\\n}\\n\",\"keccak256\":\"0x48ec601665fb10424fc0afbf0b288e123be72eaf5faecb5c440609d176b645a7\",\"license\":\"MIT\"}},\"version\":1}",
"bytecode": "0x608060405234801561001057600080fd5b506040516103df3803806103df8339818101604052604081101561003357600080fd5b81516020830180516040519294929383019291908464010000000082111561005a57600080fd5b90830190602082018581111561006f57600080fd5b825164010000000081118282018810171561008957600080fd5b82525081516020918201929091019080838360005b838110156100b657818101518382015260200161009e565b50505050905090810190601f1680156100e35780820380516001836020036101000a031916815260200191505b5060409081523060009081526001602090815282822080546001600160a01b0319166001600160a01b038a16179055818152919020855161012c95509093509085019150610134565b5050506101d5565b828054600181600116156101000203166002900490600052602060002090601f01602090048101928261016a57600085556101b0565b82601f1061018357805160ff19168380011785556101b0565b828001600101855582156101b0579182015b828111156101b0578251825591602001919060010190610195565b506101bc9291506101c0565b5090565b5b808211156101bc57600081556001016101c1565b6101fb806101e46000396000f3fe60806040818152306000908152600160208181528383205483825293832063bf40fac160e01b909552608490815284546002610100938216159390930260001901169190910460a481905291936001600160a01b039093169263bf40fac192909190819060c490849080156100b55780601f1061008a576101008083540402835291602001916100b5565b820191906000526020600020905b81548152906001019060200180831161009857829003601f168201915b50509250505060206040518083038186803b1580156100d357600080fd5b505afa1580156100e7573d6000803e3d6000fd5b505050506040513d60208110156100fd57600080fd5b505190506001600160a01b0381166101465760405162461bcd60e51b81526004018080602001828103825260238152602001806101cc6023913960400191505060405180910390fd5b600080826001600160a01b03166000366040518083838082843760405192019450600093509091505080830381855af49150503d80600081146101a5576040519150601f19603f3d011682016040523d82523d6000602084013e6101aa565b606091505b509092509050600182151514156101c357805160208201f35b805160208201fdfe5461726765742061646472657373206d75737420626520696e697469616c697a65642ea164736f6c6343000706000a",
"deployedBytecode": "0x60806040818152306000908152600160208181528383205483825293832063bf40fac160e01b909552608490815284546002610100938216159390930260001901169190910460a481905291936001600160a01b039093169263bf40fac192909190819060c490849080156100b55780601f1061008a576101008083540402835291602001916100b5565b820191906000526020600020905b81548152906001019060200180831161009857829003601f168201915b50509250505060206040518083038186803b1580156100d357600080fd5b505afa1580156100e7573d6000803e3d6000fd5b505050506040513d60208110156100fd57600080fd5b505190506001600160a01b0381166101465760405162461bcd60e51b81526004018080602001828103825260238152602001806101cc6023913960400191505060405180910390fd5b600080826001600160a01b03166000366040518083838082843760405192019450600093509091505080830381855af49150503d80600081146101a5576040519150601f19603f3d011682016040523d82523d6000602084013e6101aa565b606091505b509092509050600182151514156101c357805160208201f35b805160208201fdfe5461726765742061646472657373206d75737420626520696e697469616c697a65642ea164736f6c6343000706000a",
"solcInputHash": "f2bdab652d5102f5f11e78dae866798d",
"metadata": "{\"compiler\":{\"version\":\"0.7.6+commit.7338295f\"},\"language\":\"Solidity\",\"output\":{\"abi\":[{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_libAddressManager\",\"type\":\"address\"},{\"internalType\":\"string\",\"name\":\"_implementationName\",\"type\":\"string\"}],\"stateMutability\":\"nonpayable\",\"type\":\"constructor\"},{\"stateMutability\":\"payable\",\"type\":\"fallback\"}],\"devdoc\":{\"kind\":\"dev\",\"methods\":{\"constructor\":{\"params\":{\"_implementationName\":\"implementationName of the contract to proxy to.\",\"_libAddressManager\":\"Address of the Lib_AddressManager.\"}}},\"title\":\"Lib_ResolvedDelegateProxy\",\"version\":1},\"userdoc\":{\"kind\":\"user\",\"methods\":{},\"version\":1}},\"settings\":{\"compilationTarget\":{\"contracts/optimistic-ethereum/libraries/resolver/Lib_ResolvedDelegateProxy.sol\":\"Lib_ResolvedDelegateProxy\"},\"evmVersion\":\"istanbul\",\"libraries\":{},\"metadata\":{\"bytecodeHash\":\"ipfs\",\"useLiteralContent\":true},\"optimizer\":{\"enabled\":true,\"runs\":200},\"remappings\":[]},\"sources\":{\"@openzeppelin/contracts/access/Ownable.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity >=0.6.0 <0.8.0;\\n\\nimport \\\"../utils/Context.sol\\\";\\n/**\\n * @dev Contract module which provides a basic access control mechanism, where\\n * there is an account (an owner) that can be granted exclusive access to\\n * specific functions.\\n *\\n * By default, the owner account will be the one that deploys the contract. This\\n * can later be changed with {transferOwnership}.\\n *\\n * This module is used through inheritance. It will make available the modifier\\n * `onlyOwner`, which can be applied to your functions to restrict their use to\\n * the owner.\\n */\\nabstract contract Ownable is Context {\\n address private _owner;\\n\\n event OwnershipTransferred(address indexed previousOwner, address indexed newOwner);\\n\\n /**\\n * @dev Initializes the contract setting the deployer as the initial owner.\\n */\\n constructor () internal {\\n address msgSender = _msgSender();\\n _owner = msgSender;\\n emit OwnershipTransferred(address(0), msgSender);\\n }\\n\\n /**\\n * @dev Returns the address of the current owner.\\n */\\n function owner() public view virtual returns (address) {\\n return _owner;\\n }\\n\\n /**\\n * @dev Throws if called by any account other than the owner.\\n */\\n modifier onlyOwner() {\\n require(owner() == _msgSender(), \\\"Ownable: caller is not the owner\\\");\\n _;\\n }\\n\\n /**\\n * @dev Leaves the contract without owner. It will not be possible to call\\n * `onlyOwner` functions anymore. Can only be called by the current owner.\\n *\\n * NOTE: Renouncing ownership will leave the contract without an owner,\\n * thereby removing any functionality that is only available to the owner.\\n */\\n function renounceOwnership() public virtual onlyOwner {\\n emit OwnershipTransferred(_owner, address(0));\\n _owner = address(0);\\n }\\n\\n /**\\n * @dev Transfers ownership of the contract to a new account (`newOwner`).\\n * Can only be called by the current owner.\\n */\\n function transferOwnership(address newOwner) public virtual onlyOwner {\\n require(newOwner != address(0), \\\"Ownable: new owner is the zero address\\\");\\n emit OwnershipTransferred(_owner, newOwner);\\n _owner = newOwner;\\n }\\n}\\n\",\"keccak256\":\"0x15e2d5bd4c28a88548074c54d220e8086f638a71ed07e6b3ba5a70066fcf458d\",\"license\":\"MIT\"},\"@openzeppelin/contracts/utils/Context.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity >=0.6.0 <0.8.0;\\n\\n/*\\n * @dev Provides information about the current execution context, including the\\n * sender of the transaction and its data. While these are generally available\\n * via msg.sender and msg.data, they should not be accessed in such a direct\\n * manner, since when dealing with GSN meta-transactions the account sending and\\n * paying for execution may not be the actual sender (as far as an application\\n * is concerned).\\n *\\n * This contract is only required for intermediate, library-like contracts.\\n */\\nabstract contract Context {\\n function _msgSender() internal view virtual returns (address payable) {\\n return msg.sender;\\n }\\n\\n function _msgData() internal view virtual returns (bytes memory) {\\n this; // silence state mutability warning without generating bytecode - see https://github.com/ethereum/solidity/issues/2691\\n return msg.data;\\n }\\n}\\n\",\"keccak256\":\"0x8d3cb350f04ff49cfb10aef08d87f19dcbaecc8027b0bed12f3275cd12f38cf0\",\"license\":\"MIT\"},\"contracts/optimistic-ethereum/libraries/resolver/Lib_AddressManager.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\npragma solidity >0.5.0 <0.8.0;\\n\\n/* External Imports */\\nimport { Ownable } from \\\"@openzeppelin/contracts/access/Ownable.sol\\\";\\n\\n/**\\n * @title Lib_AddressManager\\n */\\ncontract Lib_AddressManager is Ownable {\\n\\n /**********\\n * Events *\\n **********/\\n\\n event AddressSet(\\n string _name,\\n address _newAddress\\n );\\n\\n\\n /*************\\n * Variables *\\n *************/\\n\\n mapping (bytes32 => address) private addresses;\\n\\n\\n /********************\\n * Public Functions *\\n ********************/\\n\\n /**\\n * Changes the address associated with a particular name.\\n * @param _name String name to associate an address with.\\n * @param _address Address to associate with the name.\\n */\\n function setAddress(\\n string memory _name,\\n address _address\\n )\\n external\\n onlyOwner\\n {\\n addresses[_getNameHash(_name)] = _address;\\n\\n emit AddressSet(\\n _name,\\n _address\\n );\\n }\\n\\n /**\\n * Retrieves the address associated with a given name.\\n * @param _name Name to retrieve an address for.\\n * @return Address associated with the given name.\\n */\\n function getAddress(\\n string memory _name\\n )\\n external\\n view\\n returns (\\n address\\n )\\n {\\n return addresses[_getNameHash(_name)];\\n }\\n\\n\\n /**********************\\n * Internal Functions *\\n **********************/\\n\\n /**\\n * Computes the hash of a name.\\n * @param _name Name to compute a hash for.\\n * @return Hash of the given name.\\n */\\n function _getNameHash(\\n string memory _name\\n )\\n internal\\n pure\\n returns (\\n bytes32\\n )\\n {\\n return keccak256(abi.encodePacked(_name));\\n }\\n}\\n\",\"keccak256\":\"0xcc9fc5c64f1101a5c6c397594086b1608189a9edc5c9635e1ac38f70aeeeecbf\",\"license\":\"MIT\"},\"contracts/optimistic-ethereum/libraries/resolver/Lib_ResolvedDelegateProxy.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\npragma solidity >0.5.0 <0.8.0;\\n\\n/* Library Imports */\\nimport { Lib_AddressManager } from \\\"./Lib_AddressManager.sol\\\";\\n\\n/**\\n * @title Lib_ResolvedDelegateProxy\\n */\\ncontract Lib_ResolvedDelegateProxy {\\n\\n /*************\\n * Variables *\\n *************/\\n\\n // Using mappings to store fields to avoid overwriting storage slots in the\\n // implementation contract. For example, instead of storing these fields at\\n // storage slot `0` & `1`, they are stored at `keccak256(key + slot)`.\\n // See: https://solidity.readthedocs.io/en/v0.7.0/internals/layout_in_storage.html\\n // NOTE: Do not use this code in your own contract system.\\n // There is a known flaw in this contract, and we will remove it from the repository\\n // in the near future. Due to the very limited way that we are using it, this flaw is\\n // not an issue in our system.\\n mapping (address => string) private implementationName;\\n mapping (address => Lib_AddressManager) private addressManager;\\n\\n\\n /***************\\n * Constructor *\\n ***************/\\n\\n /**\\n * @param _libAddressManager Address of the Lib_AddressManager.\\n * @param _implementationName implementationName of the contract to proxy to.\\n */\\n constructor(\\n address _libAddressManager,\\n string memory _implementationName\\n ) {\\n addressManager[address(this)] = Lib_AddressManager(_libAddressManager);\\n implementationName[address(this)] = _implementationName;\\n }\\n\\n\\n /*********************\\n * Fallback Function *\\n *********************/\\n\\n fallback()\\n external\\n payable\\n {\\n address target = addressManager[address(this)].getAddress(\\n (implementationName[address(this)])\\n );\\n\\n require(\\n target != address(0),\\n \\\"Target address must be initialized.\\\"\\n );\\n\\n (bool success, bytes memory returndata) = target.delegatecall(msg.data);\\n\\n if (success == true) {\\n assembly {\\n return(add(returndata, 0x20), mload(returndata))\\n }\\n } else {\\n assembly {\\n revert(add(returndata, 0x20), mload(returndata))\\n }\\n }\\n }\\n}\\n\",\"keccak256\":\"0xfaecb051b37f1d87d588cafb17a575723cbdf7c3c2079772110f33e747e05027\",\"license\":\"MIT\"}},\"version\":1}",
"bytecode": "0x608060405234801561001057600080fd5b506040516104083803806104088339818101604052604081101561003357600080fd5b81516020830180516040519294929383019291908464010000000082111561005a57600080fd5b90830190602082018581111561006f57600080fd5b825164010000000081118282018810171561008957600080fd5b82525081516020918201929091019080838360005b838110156100b657818101518382015260200161009e565b50505050905090810190601f1680156100e35780820380516001836020036101000a031916815260200191505b5060409081523060009081526001602090815282822080546001600160a01b0319166001600160a01b038a16179055818152919020855161012c95509093509085019150610134565b5050506101d5565b828054600181600116156101000203166002900490600052602060002090601f01602090048101928261016a57600085556101b0565b82601f1061018357805160ff19168380011785556101b0565b828001600101855582156101b0579182015b828111156101b0578251825591602001919060010190610195565b506101bc9291506101c0565b5090565b5b808211156101bc57600081556001016101c1565b610224806101e46000396000f3fe60806040818152306000908152600160208181528383205483825293832063bf40fac160e01b909552608490815284546002610100938216159390930260001901169190910460a481905291936001600160a01b039093169263bf40fac192909190819060c490849080156100b55780601f1061008a576101008083540402835291602001916100b5565b820191906000526020600020905b81548152906001019060200180831161009857829003601f168201915b50509250505060206040518083038186803b1580156100d357600080fd5b505afa1580156100e7573d6000803e3d6000fd5b505050506040513d60208110156100fd57600080fd5b505190506001600160a01b0381166101465760405162461bcd60e51b81526004018080602001828103825260238152602001806101cc6023913960400191505060405180910390fd5b600080826001600160a01b03166000366040518083838082843760405192019450600093509091505080830381855af49150503d80600081146101a5576040519150601f19603f3d011682016040523d82523d6000602084013e6101aa565b606091505b509092509050600182151514156101c357805160208201f35b805160208201fdfe5461726765742061646472657373206d75737420626520696e697469616c697a65642ea2646970667358221220ceebc7fc0b8eea3f2d3758756655b8c39c79670618f167c7b41c2b40b2e41b0964736f6c63430007060033",
"deployedBytecode": "0x60806040818152306000908152600160208181528383205483825293832063bf40fac160e01b909552608490815284546002610100938216159390930260001901169190910460a481905291936001600160a01b039093169263bf40fac192909190819060c490849080156100b55780601f1061008a576101008083540402835291602001916100b5565b820191906000526020600020905b81548152906001019060200180831161009857829003601f168201915b50509250505060206040518083038186803b1580156100d357600080fd5b505afa1580156100e7573d6000803e3d6000fd5b505050506040513d60208110156100fd57600080fd5b505190506001600160a01b0381166101465760405162461bcd60e51b81526004018080602001828103825260238152602001806101cc6023913960400191505060405180910390fd5b600080826001600160a01b03166000366040518083838082843760405192019450600093509091505080830381855af49150503d80600081146101a5576040519150601f19603f3d011682016040523d82523d6000602084013e6101aa565b606091505b509092509050600182151514156101c357805160208201f35b805160208201fdfe5461726765742061646472657373206d75737420626520696e697469616c697a65642ea2646970667358221220ceebc7fc0b8eea3f2d3758756655b8c39c79670618f167c7b41c2b40b2e41b0964736f6c63430007060033",
"devdoc": {
"kind": "dev",
"methods": {
......@@ -67,7 +67,7 @@
"storageLayout": {
"storage": [
{
"astId": 12679,
"astId": 12893,
"contract": "contracts/optimistic-ethereum/libraries/resolver/Lib_ResolvedDelegateProxy.sol:Lib_ResolvedDelegateProxy",
"label": "implementationName",
"offset": 0,
......@@ -75,12 +75,12 @@
"type": "t_mapping(t_address,t_string_storage)"
},
{
"astId": 12683,
"astId": 12897,
"contract": "contracts/optimistic-ethereum/libraries/resolver/Lib_ResolvedDelegateProxy.sol:Lib_ResolvedDelegateProxy",
"label": "addressManager",
"offset": 0,
"slot": "1",
"type": "t_mapping(t_address,t_contract(Lib_AddressManager)12547)"
"type": "t_mapping(t_address,t_contract(Lib_AddressManager)12849)"
}
],
"types": {
......@@ -89,17 +89,17 @@
"label": "address",
"numberOfBytes": "20"
},
"t_contract(Lib_AddressManager)12547": {
"t_contract(Lib_AddressManager)12849": {
"encoding": "inplace",
"label": "contract Lib_AddressManager",
"numberOfBytes": "20"
},
"t_mapping(t_address,t_contract(Lib_AddressManager)12547)": {
"t_mapping(t_address,t_contract(Lib_AddressManager)12849)": {
"encoding": "mapping",
"key": "t_address",
"label": "mapping(address => contract Lib_AddressManager)",
"numberOfBytes": "32",
"value": "t_contract(Lib_AddressManager)12547"
"value": "t_contract(Lib_AddressManager)12849"
},
"t_mapping(t_address,t_string_storage)": {
"encoding": "mapping",
......
{
"address": "0x99EDa8472E93Aa28E5470eEDEc6e32081E14DaFC",
"address": "0x90c5F8d045bBcCc99d907f30E8707F06D95d065b",
"abi": [
{
"inputs": [
......@@ -158,7 +158,7 @@
"outputs": [
{
"internalType": "address",
"name": "_contract",
"name": "",
"type": "address"
}
],
......@@ -173,53 +173,66 @@
"type": "function"
}
],
"transactionHash": "0x86a064087eb71581e0d3e1d758da8b6fa13af268ae2e7fffdc3ed74a871c6fc7",
"transactionHash": "0xadf883750d1fe05cb4526571830ad256c35c64c86a378e248f54c284d3fa266c",
"receipt": {
"to": null,
"from": "0x77C4c8f491e5ff22a2C0E18b005c3BA0Fe36c1Bc",
"contractAddress": "0x99EDa8472E93Aa28E5470eEDEc6e32081E14DaFC",
"transactionIndex": 60,
"gasUsed": "288329",
"from": "0xd033f09cB85621F98F7A84C64dB381ac16Eff818",
"contractAddress": "0x90c5F8d045bBcCc99d907f30E8707F06D95d065b",
"transactionIndex": 241,
"gasUsed": "298498",
"logsBloom": "0x00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000",
"blockHash": "0xd93126d10c2b3dee217a0c998f20119fe1e6dada9e96980460fc0079385c64e5",
"transactionHash": "0x86a064087eb71581e0d3e1d758da8b6fa13af268ae2e7fffdc3ed74a871c6fc7",
"blockHash": "0x324cda21e491b7c979caf4a0b957c1e93e98779989ed66455d8521e06103478d",
"transactionHash": "0xadf883750d1fe05cb4526571830ad256c35c64c86a378e248f54c284d3fa266c",
"logs": [],
"blockNumber": 12207803,
"cumulativeGasUsed": "10831678",
"blockNumber": 12410819,
"cumulativeGasUsed": "10713382",
"status": 1,
"byzantium": true
},
"args": [
"0xd3EeD86464Ff13B4BFD81a3bB1e753b7ceBA3A39"
"0x668E5b997b9aE88a56cd40409119d4Db9e6d752E"
],
"solcInputHash": "43ee6bb8ef92595aa6d0e22a6c464dff",
"metadata": "{\"compiler\":{\"version\":\"0.7.6+commit.7338295f\"},\"language\":\"Solidity\",\"output\":{\"abi\":[{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_libAddressManager\",\"type\":\"address\"}],\"stateMutability\":\"nonpayable\",\"type\":\"constructor\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_who\",\"type\":\"address\"}],\"name\":\"claim\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"deposit\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"_preStateRoot\",\"type\":\"bytes32\"},{\"internalType\":\"address\",\"name\":\"_publisher\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"_timestamp\",\"type\":\"uint256\"}],\"name\":\"finalize\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"finalizeWithdrawal\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"},{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"name\":\"getGasSpent\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"pure\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_who\",\"type\":\"address\"}],\"name\":\"isCollateralized\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"libAddressManager\",\"outputs\":[{\"internalType\":\"contract Lib_AddressManager\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"_preStateRoot\",\"type\":\"bytes32\"},{\"internalType\":\"bytes32\",\"name\":\"_txHash\",\"type\":\"bytes32\"},{\"internalType\":\"address\",\"name\":\"_who\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"_gasSpent\",\"type\":\"uint256\"}],\"name\":\"recordGasSpent\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"string\",\"name\":\"_name\",\"type\":\"string\"}],\"name\":\"resolve\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"_contract\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"startWithdrawal\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"}],\"devdoc\":{\"kind\":\"dev\",\"methods\":{},\"title\":\"mockOVM_BondManager\",\"version\":1},\"userdoc\":{\"kind\":\"user\",\"methods\":{},\"version\":1}},\"settings\":{\"compilationTarget\":{\"contracts/optimistic-ethereum/mockOVM/verification/mockOVM_BondManager.sol\":\"mockOVM_BondManager\"},\"evmVersion\":\"istanbul\",\"libraries\":{},\"metadata\":{\"bytecodeHash\":\"none\",\"useLiteralContent\":true},\"optimizer\":{\"enabled\":true,\"runs\":200},\"remappings\":[]},\"sources\":{\"contracts/optimistic-ethereum/iOVM/verification/iOVM_BondManager.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\npragma solidity >0.5.0 <0.8.0;\\n\\ninterface ERC20 {\\n function transfer(address, uint256) external returns (bool);\\n function transferFrom(address, address, uint256) external returns (bool);\\n}\\n\\n/// All the errors which may be encountered on the bond manager\\nlibrary Errors {\\n string constant ERC20_ERR = \\\"BondManager: Could not post bond\\\";\\n string constant ALREADY_FINALIZED = \\\"BondManager: Fraud proof for this pre-state root has already been finalized\\\";\\n string constant SLASHED = \\\"BondManager: Cannot finalize withdrawal, you probably got slashed\\\";\\n string constant WRONG_STATE = \\\"BondManager: Wrong bond state for proposer\\\";\\n string constant CANNOT_CLAIM = \\\"BondManager: Cannot claim yet. Dispute must be finalized first\\\";\\n\\n string constant WITHDRAWAL_PENDING = \\\"BondManager: Withdrawal already pending\\\";\\n string constant TOO_EARLY = \\\"BondManager: Too early to finalize your withdrawal\\\";\\n\\n string constant ONLY_TRANSITIONER = \\\"BondManager: Only the transitioner for this pre-state root may call this function\\\";\\n string constant ONLY_FRAUD_VERIFIER = \\\"BondManager: Only the fraud verifier may call this function\\\";\\n string constant ONLY_STATE_COMMITMENT_CHAIN = \\\"BondManager: Only the state commitment chain may call this function\\\";\\n string constant WAIT_FOR_DISPUTES = \\\"BondManager: Wait for other potential disputes\\\";\\n}\\n\\n/**\\n * @title iOVM_BondManager\\n */\\ninterface iOVM_BondManager {\\n\\n /*******************\\n * Data Structures *\\n *******************/\\n\\n /// The lifecycle of a proposer's bond\\n enum State {\\n // Before depositing or after getting slashed, a user is uncollateralized\\n NOT_COLLATERALIZED,\\n // After depositing, a user is collateralized\\n COLLATERALIZED,\\n // After a user has initiated a withdrawal\\n WITHDRAWING\\n }\\n\\n /// A bond posted by a proposer\\n struct Bond {\\n // The user's state\\n State state;\\n // The timestamp at which a proposer issued their withdrawal request\\n uint32 withdrawalTimestamp;\\n // The time when the first disputed was initiated for this bond\\n uint256 firstDisputeAt;\\n // The earliest observed state root for this bond which has had fraud\\n bytes32 earliestDisputedStateRoot;\\n // The state root's timestamp\\n uint256 earliestTimestamp;\\n }\\n\\n // Per pre-state root, store the number of state provisions that were made\\n // and how many of these calls were made by each user. Payouts will then be\\n // claimed by users proportionally for that dispute.\\n struct Rewards {\\n // Flag to check if rewards for a fraud proof are claimable\\n bool canClaim;\\n // Total number of `recordGasSpent` calls made\\n uint256 total;\\n // The gas spent by each user to provide witness data. The sum of all\\n // values inside this map MUST be equal to the value of `total`\\n mapping(address => uint256) gasSpent;\\n }\\n\\n\\n /********************\\n * Public Functions *\\n ********************/\\n\\n function recordGasSpent(\\n bytes32 _preStateRoot,\\n bytes32 _txHash,\\n address _who,\\n uint256 _gasSpent\\n ) external;\\n\\n function finalize(\\n bytes32 _preStateRoot,\\n address _publisher,\\n uint256 _timestamp\\n ) external;\\n\\n function deposit() external;\\n\\n function startWithdrawal() external;\\n\\n function finalizeWithdrawal() external;\\n\\n function claim(\\n address _who\\n ) external;\\n\\n function isCollateralized(\\n address _who\\n ) external view returns (bool);\\n\\n function getGasSpent(\\n bytes32 _preStateRoot,\\n address _who\\n ) external view returns (uint256);\\n}\\n\",\"keccak256\":\"0x3c2a8a399487857158649db1896749d86e39cba545a8aeb2e2bb0f3bdfa7a5b1\",\"license\":\"MIT\"},\"contracts/optimistic-ethereum/libraries/resolver/Lib_AddressManager.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\npragma solidity >0.5.0 <0.8.0;\\n\\n/* Contract Imports */\\nimport { Ownable } from \\\"./Lib_Ownable.sol\\\";\\n\\n/**\\n * @title Lib_AddressManager\\n */\\ncontract Lib_AddressManager is Ownable {\\n\\n /**********\\n * Events *\\n **********/\\n\\n event AddressSet(\\n string _name,\\n address _newAddress\\n );\\n\\n /*******************************************\\n * Contract Variables: Internal Accounting *\\n *******************************************/\\n\\n mapping (bytes32 => address) private addresses;\\n\\n\\n /********************\\n * Public Functions *\\n ********************/\\n\\n function setAddress(\\n string memory _name,\\n address _address\\n )\\n public\\n onlyOwner\\n {\\n emit AddressSet(_name, _address);\\n addresses[_getNameHash(_name)] = _address;\\n }\\n\\n function getAddress(\\n string memory _name\\n )\\n public\\n view\\n returns (address)\\n {\\n return addresses[_getNameHash(_name)];\\n }\\n\\n\\n /**********************\\n * Internal Functions *\\n **********************/\\n\\n function _getNameHash(\\n string memory _name\\n )\\n internal\\n pure\\n returns (\\n bytes32 _hash\\n )\\n {\\n return keccak256(abi.encodePacked(_name));\\n }\\n}\\n\",\"keccak256\":\"0x3a490595cc21ff170e4027843093670ff845d5972481fbfb956b722ea564bb06\",\"license\":\"MIT\"},\"contracts/optimistic-ethereum/libraries/resolver/Lib_AddressResolver.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\npragma solidity >0.5.0 <0.8.0;\\n\\n/* Library Imports */\\nimport { Lib_AddressManager } from \\\"./Lib_AddressManager.sol\\\";\\n\\n/**\\n * @title Lib_AddressResolver\\n */\\nabstract contract Lib_AddressResolver {\\n\\n /*******************************************\\n * Contract Variables: Contract References *\\n *******************************************/\\n\\n Lib_AddressManager public libAddressManager;\\n\\n\\n /***************\\n * Constructor *\\n ***************/\\n\\n /**\\n * @param _libAddressManager Address of the Lib_AddressManager.\\n */\\n constructor(\\n address _libAddressManager\\n ) {\\n libAddressManager = Lib_AddressManager(_libAddressManager);\\n }\\n\\n\\n /********************\\n * Public Functions *\\n ********************/\\n\\n function resolve(\\n string memory _name\\n )\\n public\\n view\\n returns (\\n address _contract\\n )\\n {\\n return libAddressManager.getAddress(_name);\\n }\\n}\\n\",\"keccak256\":\"0xaa3ed342f6deb156c660fd83afa579a3b80db17eb465e8949cf5c1b114780143\",\"license\":\"MIT\"},\"contracts/optimistic-ethereum/libraries/resolver/Lib_Ownable.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\npragma solidity >0.5.0 <0.8.0;\\n\\n/**\\n * @title Ownable\\n * @dev Adapted from https://github.com/OpenZeppelin/openzeppelin-contracts/blob/master/contracts/access/Ownable.sol\\n */\\nabstract contract Ownable {\\n\\n /*************\\n * Variables *\\n *************/\\n\\n address public owner;\\n\\n\\n /**********\\n * Events *\\n **********/\\n\\n event OwnershipTransferred(\\n address indexed previousOwner,\\n address indexed newOwner\\n );\\n\\n\\n /***************\\n * Constructor *\\n ***************/\\n\\n constructor() {\\n owner = msg.sender;\\n emit OwnershipTransferred(address(0), owner);\\n }\\n\\n\\n /**********************\\n * Function Modifiers *\\n **********************/\\n\\n modifier onlyOwner() {\\n require(\\n owner == msg.sender,\\n \\\"Ownable: caller is not the owner\\\"\\n );\\n _;\\n }\\n\\n\\n /********************\\n * Public Functions *\\n ********************/\\n\\n function renounceOwnership()\\n public\\n virtual\\n onlyOwner\\n {\\n emit OwnershipTransferred(owner, address(0));\\n owner = address(0);\\n }\\n\\n function transferOwnership(address _newOwner)\\n public\\n virtual\\n onlyOwner\\n {\\n require(\\n _newOwner != address(0),\\n \\\"Ownable: new owner cannot be the zero address\\\"\\n );\\n\\n emit OwnershipTransferred(owner, _newOwner);\\n owner = _newOwner;\\n }\\n}\\n\",\"keccak256\":\"0xd9dfd9264e5b5fedd53a5b10fdf179c3f367614b0fe69179bce4e45119f5b739\",\"license\":\"MIT\"},\"contracts/optimistic-ethereum/mockOVM/verification/mockOVM_BondManager.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\npragma solidity >0.5.0 <0.8.0;\\n\\n/* Interface Imports */\\nimport { iOVM_BondManager } from \\\"../../iOVM/verification/iOVM_BondManager.sol\\\";\\n\\n/* Contract Imports */\\nimport { Lib_AddressResolver } from \\\"../../libraries/resolver/Lib_AddressResolver.sol\\\";\\n\\n/**\\n * @title mockOVM_BondManager\\n */\\ncontract mockOVM_BondManager is iOVM_BondManager, Lib_AddressResolver {\\n constructor(\\n address _libAddressManager\\n )\\n Lib_AddressResolver(_libAddressManager)\\n {}\\n\\n function recordGasSpent(\\n bytes32 _preStateRoot,\\n bytes32 _txHash,\\n address _who,\\n uint256 _gasSpent\\n )\\n override\\n public\\n {}\\n\\n function finalize(\\n bytes32 _preStateRoot,\\n address _publisher,\\n uint256 _timestamp\\n )\\n override\\n public\\n {}\\n\\n function deposit()\\n override\\n public\\n {}\\n\\n function startWithdrawal()\\n override\\n public\\n {}\\n\\n function finalizeWithdrawal()\\n override\\n public\\n {}\\n\\n function claim(\\n address _who\\n )\\n override\\n public\\n {}\\n\\n function isCollateralized(\\n address _who\\n )\\n override\\n public\\n view\\n returns (\\n bool\\n )\\n {\\n // Only authenticate sequencer to submit state root batches.\\n return _who == resolve(\\\"OVM_Proposer\\\");\\n }\\n\\n function getGasSpent(\\n bytes32, // _preStateRoot,\\n address // _who\\n )\\n override\\n public\\n pure \\n returns (\\n uint256\\n )\\n {\\n return 0;\\n }\\n}\\n\",\"keccak256\":\"0x7742f2892255ca236320217d067f846bbd8f17d1561fae97f492de390598c667\",\"license\":\"MIT\"}},\"version\":1}",
"bytecode": "0x608060405234801561001057600080fd5b5060405161043e38038061043e8339818101604052602081101561003357600080fd5b5051600080546001600160a01b039092166001600160a01b03199092169190911790556103d9806100656000396000f3fe608060405234801561001057600080fd5b506004361061009e5760003560e01c8063abfbbe1311610066578063abfbbe1314610207578063bc2f8dd814610239578063c5b6aa2f14610239578063d0e30db014610239578063dc6453dc146102415761009e565b806302ad4d2a146100a35780631e16e92f146100dd5780631e83409a14610117578063299ca4781461013d578063461a447814610161575b600080fd5b6100c9600480360360208110156100b957600080fd5b50356001600160a01b031661027f565b604080519115158252519081900360200190f35b610115600480360360808110156100f357600080fd5b508035906020810135906001600160a01b0360408201351690606001356102c9565b005b6101156004803603602081101561012d57600080fd5b50356001600160a01b03166102cf565b6101456102d2565b604080516001600160a01b039092168252519081900360200190f35b6101456004803603602081101561017757600080fd5b81019060208101813564010000000081111561019257600080fd5b8201836020820111156101a457600080fd5b803590602001918460018302840111640100000000831117156101c657600080fd5b91908080601f0160208091040260200160405190810160405280939291908181526020018383808284376000920191909152509295506102e1945050505050565b6101156004803603606081101561021d57600080fd5b508035906001600160a01b0360208201351690604001356103bd565b6101156103c2565b61026d6004803603604081101561025757600080fd5b50803590602001356001600160a01b03166103c4565b60408051918252519081900360200190f35b60006102ae6040518060400160405280600c81526020016b27ab26afa83937b837b9b2b960a11b8152506102e1565b6001600160a01b0316826001600160a01b0316149050919050565b50505050565b50565b6000546001600160a01b031681565b6000805460405163bf40fac160e01b81526020600482018181528551602484015285516001600160a01b039094169363bf40fac19387938392604490920191908501908083838b5b83811015610341578181015183820152602001610329565b50505050905090810190601f16801561036e5780820380516001836020036101000a031916815260200191505b509250505060206040518083038186803b15801561038b57600080fd5b505afa15801561039f573d6000803e3d6000fd5b505050506040513d60208110156103b557600080fd5b505192915050565b505050565b565b60009291505056fea164736f6c6343000706000a",
"deployedBytecode": "0x608060405234801561001057600080fd5b506004361061009e5760003560e01c8063abfbbe1311610066578063abfbbe1314610207578063bc2f8dd814610239578063c5b6aa2f14610239578063d0e30db014610239578063dc6453dc146102415761009e565b806302ad4d2a146100a35780631e16e92f146100dd5780631e83409a14610117578063299ca4781461013d578063461a447814610161575b600080fd5b6100c9600480360360208110156100b957600080fd5b50356001600160a01b031661027f565b604080519115158252519081900360200190f35b610115600480360360808110156100f357600080fd5b508035906020810135906001600160a01b0360408201351690606001356102c9565b005b6101156004803603602081101561012d57600080fd5b50356001600160a01b03166102cf565b6101456102d2565b604080516001600160a01b039092168252519081900360200190f35b6101456004803603602081101561017757600080fd5b81019060208101813564010000000081111561019257600080fd5b8201836020820111156101a457600080fd5b803590602001918460018302840111640100000000831117156101c657600080fd5b91908080601f0160208091040260200160405190810160405280939291908181526020018383808284376000920191909152509295506102e1945050505050565b6101156004803603606081101561021d57600080fd5b508035906001600160a01b0360208201351690604001356103bd565b6101156103c2565b61026d6004803603604081101561025757600080fd5b50803590602001356001600160a01b03166103c4565b60408051918252519081900360200190f35b60006102ae6040518060400160405280600c81526020016b27ab26afa83937b837b9b2b960a11b8152506102e1565b6001600160a01b0316826001600160a01b0316149050919050565b50505050565b50565b6000546001600160a01b031681565b6000805460405163bf40fac160e01b81526020600482018181528551602484015285516001600160a01b039094169363bf40fac19387938392604490920191908501908083838b5b83811015610341578181015183820152602001610329565b50505050905090810190601f16801561036e5780820380516001836020036101000a031916815260200191505b509250505060206040518083038186803b15801561038b57600080fd5b505afa15801561039f573d6000803e3d6000fd5b505050506040513d60208110156103b557600080fd5b505192915050565b505050565b565b60009291505056fea164736f6c6343000706000a",
"solcInputHash": "f2bdab652d5102f5f11e78dae866798d",
"metadata": "{\"compiler\":{\"version\":\"0.7.6+commit.7338295f\"},\"language\":\"Solidity\",\"output\":{\"abi\":[{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_libAddressManager\",\"type\":\"address\"}],\"stateMutability\":\"nonpayable\",\"type\":\"constructor\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_who\",\"type\":\"address\"}],\"name\":\"claim\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"deposit\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"_preStateRoot\",\"type\":\"bytes32\"},{\"internalType\":\"address\",\"name\":\"_publisher\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"_timestamp\",\"type\":\"uint256\"}],\"name\":\"finalize\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"finalizeWithdrawal\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"},{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"name\":\"getGasSpent\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"pure\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_who\",\"type\":\"address\"}],\"name\":\"isCollateralized\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"libAddressManager\",\"outputs\":[{\"internalType\":\"contract Lib_AddressManager\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"_preStateRoot\",\"type\":\"bytes32\"},{\"internalType\":\"bytes32\",\"name\":\"_txHash\",\"type\":\"bytes32\"},{\"internalType\":\"address\",\"name\":\"_who\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"_gasSpent\",\"type\":\"uint256\"}],\"name\":\"recordGasSpent\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"string\",\"name\":\"_name\",\"type\":\"string\"}],\"name\":\"resolve\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"startWithdrawal\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"}],\"devdoc\":{\"kind\":\"dev\",\"methods\":{\"resolve(string)\":{\"params\":{\"_name\":\"Name to resolve an address for.\"},\"returns\":{\"_0\":\"Address associated with the given name.\"}}},\"title\":\"mockOVM_BondManager\",\"version\":1},\"userdoc\":{\"kind\":\"user\",\"methods\":{\"resolve(string)\":{\"notice\":\"Resolves the address associated with a given name.\"}},\"version\":1}},\"settings\":{\"compilationTarget\":{\"contracts/optimistic-ethereum/mockOVM/verification/mockOVM_BondManager.sol\":\"mockOVM_BondManager\"},\"evmVersion\":\"istanbul\",\"libraries\":{},\"metadata\":{\"bytecodeHash\":\"ipfs\",\"useLiteralContent\":true},\"optimizer\":{\"enabled\":true,\"runs\":200},\"remappings\":[]},\"sources\":{\"@openzeppelin/contracts/access/Ownable.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity >=0.6.0 <0.8.0;\\n\\nimport \\\"../utils/Context.sol\\\";\\n/**\\n * @dev Contract module which provides a basic access control mechanism, where\\n * there is an account (an owner) that can be granted exclusive access to\\n * specific functions.\\n *\\n * By default, the owner account will be the one that deploys the contract. This\\n * can later be changed with {transferOwnership}.\\n *\\n * This module is used through inheritance. It will make available the modifier\\n * `onlyOwner`, which can be applied to your functions to restrict their use to\\n * the owner.\\n */\\nabstract contract Ownable is Context {\\n address private _owner;\\n\\n event OwnershipTransferred(address indexed previousOwner, address indexed newOwner);\\n\\n /**\\n * @dev Initializes the contract setting the deployer as the initial owner.\\n */\\n constructor () internal {\\n address msgSender = _msgSender();\\n _owner = msgSender;\\n emit OwnershipTransferred(address(0), msgSender);\\n }\\n\\n /**\\n * @dev Returns the address of the current owner.\\n */\\n function owner() public view virtual returns (address) {\\n return _owner;\\n }\\n\\n /**\\n * @dev Throws if called by any account other than the owner.\\n */\\n modifier onlyOwner() {\\n require(owner() == _msgSender(), \\\"Ownable: caller is not the owner\\\");\\n _;\\n }\\n\\n /**\\n * @dev Leaves the contract without owner. It will not be possible to call\\n * `onlyOwner` functions anymore. Can only be called by the current owner.\\n *\\n * NOTE: Renouncing ownership will leave the contract without an owner,\\n * thereby removing any functionality that is only available to the owner.\\n */\\n function renounceOwnership() public virtual onlyOwner {\\n emit OwnershipTransferred(_owner, address(0));\\n _owner = address(0);\\n }\\n\\n /**\\n * @dev Transfers ownership of the contract to a new account (`newOwner`).\\n * Can only be called by the current owner.\\n */\\n function transferOwnership(address newOwner) public virtual onlyOwner {\\n require(newOwner != address(0), \\\"Ownable: new owner is the zero address\\\");\\n emit OwnershipTransferred(_owner, newOwner);\\n _owner = newOwner;\\n }\\n}\\n\",\"keccak256\":\"0x15e2d5bd4c28a88548074c54d220e8086f638a71ed07e6b3ba5a70066fcf458d\",\"license\":\"MIT\"},\"@openzeppelin/contracts/utils/Context.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity >=0.6.0 <0.8.0;\\n\\n/*\\n * @dev Provides information about the current execution context, including the\\n * sender of the transaction and its data. While these are generally available\\n * via msg.sender and msg.data, they should not be accessed in such a direct\\n * manner, since when dealing with GSN meta-transactions the account sending and\\n * paying for execution may not be the actual sender (as far as an application\\n * is concerned).\\n *\\n * This contract is only required for intermediate, library-like contracts.\\n */\\nabstract contract Context {\\n function _msgSender() internal view virtual returns (address payable) {\\n return msg.sender;\\n }\\n\\n function _msgData() internal view virtual returns (bytes memory) {\\n this; // silence state mutability warning without generating bytecode - see https://github.com/ethereum/solidity/issues/2691\\n return msg.data;\\n }\\n}\\n\",\"keccak256\":\"0x8d3cb350f04ff49cfb10aef08d87f19dcbaecc8027b0bed12f3275cd12f38cf0\",\"license\":\"MIT\"},\"contracts/optimistic-ethereum/iOVM/verification/iOVM_BondManager.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\npragma solidity >0.5.0 <0.8.0;\\n\\ninterface ERC20 {\\n function transfer(address, uint256) external returns (bool);\\n function transferFrom(address, address, uint256) external returns (bool);\\n}\\n\\n/// All the errors which may be encountered on the bond manager\\nlibrary Errors {\\n string constant ERC20_ERR = \\\"BondManager: Could not post bond\\\";\\n string constant ALREADY_FINALIZED = \\\"BondManager: Fraud proof for this pre-state root has already been finalized\\\";\\n string constant SLASHED = \\\"BondManager: Cannot finalize withdrawal, you probably got slashed\\\";\\n string constant WRONG_STATE = \\\"BondManager: Wrong bond state for proposer\\\";\\n string constant CANNOT_CLAIM = \\\"BondManager: Cannot claim yet. Dispute must be finalized first\\\";\\n\\n string constant WITHDRAWAL_PENDING = \\\"BondManager: Withdrawal already pending\\\";\\n string constant TOO_EARLY = \\\"BondManager: Too early to finalize your withdrawal\\\";\\n\\n string constant ONLY_TRANSITIONER = \\\"BondManager: Only the transitioner for this pre-state root may call this function\\\";\\n string constant ONLY_FRAUD_VERIFIER = \\\"BondManager: Only the fraud verifier may call this function\\\";\\n string constant ONLY_STATE_COMMITMENT_CHAIN = \\\"BondManager: Only the state commitment chain may call this function\\\";\\n string constant WAIT_FOR_DISPUTES = \\\"BondManager: Wait for other potential disputes\\\";\\n}\\n\\n/**\\n * @title iOVM_BondManager\\n */\\ninterface iOVM_BondManager {\\n\\n /*******************\\n * Data Structures *\\n *******************/\\n\\n /// The lifecycle of a proposer's bond\\n enum State {\\n // Before depositing or after getting slashed, a user is uncollateralized\\n NOT_COLLATERALIZED,\\n // After depositing, a user is collateralized\\n COLLATERALIZED,\\n // After a user has initiated a withdrawal\\n WITHDRAWING\\n }\\n\\n /// A bond posted by a proposer\\n struct Bond {\\n // The user's state\\n State state;\\n // The timestamp at which a proposer issued their withdrawal request\\n uint32 withdrawalTimestamp;\\n // The time when the first disputed was initiated for this bond\\n uint256 firstDisputeAt;\\n // The earliest observed state root for this bond which has had fraud\\n bytes32 earliestDisputedStateRoot;\\n // The state root's timestamp\\n uint256 earliestTimestamp;\\n }\\n\\n // Per pre-state root, store the number of state provisions that were made\\n // and how many of these calls were made by each user. Payouts will then be\\n // claimed by users proportionally for that dispute.\\n struct Rewards {\\n // Flag to check if rewards for a fraud proof are claimable\\n bool canClaim;\\n // Total number of `recordGasSpent` calls made\\n uint256 total;\\n // The gas spent by each user to provide witness data. The sum of all\\n // values inside this map MUST be equal to the value of `total`\\n mapping(address => uint256) gasSpent;\\n }\\n\\n\\n /********************\\n * Public Functions *\\n ********************/\\n\\n function recordGasSpent(\\n bytes32 _preStateRoot,\\n bytes32 _txHash,\\n address _who,\\n uint256 _gasSpent\\n ) external;\\n\\n function finalize(\\n bytes32 _preStateRoot,\\n address _publisher,\\n uint256 _timestamp\\n ) external;\\n\\n function deposit() external;\\n\\n function startWithdrawal() external;\\n\\n function finalizeWithdrawal() external;\\n\\n function claim(\\n address _who\\n ) external;\\n\\n function isCollateralized(\\n address _who\\n ) external view returns (bool);\\n\\n function getGasSpent(\\n bytes32 _preStateRoot,\\n address _who\\n ) external view returns (uint256);\\n}\\n\",\"keccak256\":\"0x3c2a8a399487857158649db1896749d86e39cba545a8aeb2e2bb0f3bdfa7a5b1\",\"license\":\"MIT\"},\"contracts/optimistic-ethereum/libraries/resolver/Lib_AddressManager.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\npragma solidity >0.5.0 <0.8.0;\\n\\n/* External Imports */\\nimport { Ownable } from \\\"@openzeppelin/contracts/access/Ownable.sol\\\";\\n\\n/**\\n * @title Lib_AddressManager\\n */\\ncontract Lib_AddressManager is Ownable {\\n\\n /**********\\n * Events *\\n **********/\\n\\n event AddressSet(\\n string _name,\\n address _newAddress\\n );\\n\\n\\n /*************\\n * Variables *\\n *************/\\n\\n mapping (bytes32 => address) private addresses;\\n\\n\\n /********************\\n * Public Functions *\\n ********************/\\n\\n /**\\n * Changes the address associated with a particular name.\\n * @param _name String name to associate an address with.\\n * @param _address Address to associate with the name.\\n */\\n function setAddress(\\n string memory _name,\\n address _address\\n )\\n external\\n onlyOwner\\n {\\n addresses[_getNameHash(_name)] = _address;\\n\\n emit AddressSet(\\n _name,\\n _address\\n );\\n }\\n\\n /**\\n * Retrieves the address associated with a given name.\\n * @param _name Name to retrieve an address for.\\n * @return Address associated with the given name.\\n */\\n function getAddress(\\n string memory _name\\n )\\n external\\n view\\n returns (\\n address\\n )\\n {\\n return addresses[_getNameHash(_name)];\\n }\\n\\n\\n /**********************\\n * Internal Functions *\\n **********************/\\n\\n /**\\n * Computes the hash of a name.\\n * @param _name Name to compute a hash for.\\n * @return Hash of the given name.\\n */\\n function _getNameHash(\\n string memory _name\\n )\\n internal\\n pure\\n returns (\\n bytes32\\n )\\n {\\n return keccak256(abi.encodePacked(_name));\\n }\\n}\\n\",\"keccak256\":\"0xcc9fc5c64f1101a5c6c397594086b1608189a9edc5c9635e1ac38f70aeeeecbf\",\"license\":\"MIT\"},\"contracts/optimistic-ethereum/libraries/resolver/Lib_AddressResolver.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\npragma solidity >0.5.0 <0.8.0;\\n\\n/* Library Imports */\\nimport { Lib_AddressManager } from \\\"./Lib_AddressManager.sol\\\";\\n\\n/**\\n * @title Lib_AddressResolver\\n */\\nabstract contract Lib_AddressResolver {\\n\\n /*************\\n * Variables *\\n *************/\\n\\n Lib_AddressManager public libAddressManager;\\n\\n\\n /***************\\n * Constructor *\\n ***************/\\n\\n /**\\n * @param _libAddressManager Address of the Lib_AddressManager.\\n */\\n constructor(\\n address _libAddressManager\\n ) {\\n libAddressManager = Lib_AddressManager(_libAddressManager);\\n }\\n\\n\\n /********************\\n * Public Functions *\\n ********************/\\n\\n /**\\n * Resolves the address associated with a given name.\\n * @param _name Name to resolve an address for.\\n * @return Address associated with the given name.\\n */\\n function resolve(\\n string memory _name\\n )\\n public\\n view\\n returns (\\n address\\n )\\n {\\n return libAddressManager.getAddress(_name);\\n }\\n}\\n\",\"keccak256\":\"0x65981feeabff6a81783ea97d44baf988a18a86c8cb374c46fdb71819cbacc7c0\",\"license\":\"MIT\"},\"contracts/optimistic-ethereum/mockOVM/verification/mockOVM_BondManager.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\npragma solidity >0.5.0 <0.8.0;\\n\\n/* Interface Imports */\\nimport { iOVM_BondManager } from \\\"../../iOVM/verification/iOVM_BondManager.sol\\\";\\n\\n/* Contract Imports */\\nimport { Lib_AddressResolver } from \\\"../../libraries/resolver/Lib_AddressResolver.sol\\\";\\n\\n/**\\n * @title mockOVM_BondManager\\n */\\ncontract mockOVM_BondManager is iOVM_BondManager, Lib_AddressResolver {\\n constructor(\\n address _libAddressManager\\n )\\n Lib_AddressResolver(_libAddressManager)\\n {}\\n\\n function recordGasSpent(\\n bytes32 _preStateRoot,\\n bytes32 _txHash,\\n address _who,\\n uint256 _gasSpent\\n )\\n override\\n public\\n {}\\n\\n function finalize(\\n bytes32 _preStateRoot,\\n address _publisher,\\n uint256 _timestamp\\n )\\n override\\n public\\n {}\\n\\n function deposit()\\n override\\n public\\n {}\\n\\n function startWithdrawal()\\n override\\n public\\n {}\\n\\n function finalizeWithdrawal()\\n override\\n public\\n {}\\n\\n function claim(\\n address _who\\n )\\n override\\n public\\n {}\\n\\n function isCollateralized(\\n address _who\\n )\\n override\\n public\\n view\\n returns (\\n bool\\n )\\n {\\n // Only authenticate sequencer to submit state root batches.\\n return _who == resolve(\\\"OVM_Proposer\\\");\\n }\\n\\n function getGasSpent(\\n bytes32, // _preStateRoot,\\n address // _who\\n )\\n override\\n public\\n pure\\n returns (\\n uint256\\n )\\n {\\n return 0;\\n }\\n}\\n\",\"keccak256\":\"0xe649b49573ba5babca407f116e97dc13f24bf677cbcd03824a2eb98a7750c4e8\",\"license\":\"MIT\"}},\"version\":1}",
"bytecode": "0x608060405234801561001057600080fd5b506040516104673803806104678339818101604052602081101561003357600080fd5b5051600080546001600160a01b039092166001600160a01b0319909216919091179055610402806100656000396000f3fe608060405234801561001057600080fd5b506004361061009e5760003560e01c8063abfbbe1311610066578063abfbbe1314610207578063bc2f8dd814610239578063c5b6aa2f14610239578063d0e30db014610239578063dc6453dc146102415761009e565b806302ad4d2a146100a35780631e16e92f146100dd5780631e83409a14610117578063299ca4781461013d578063461a447814610161575b600080fd5b6100c9600480360360208110156100b957600080fd5b50356001600160a01b031661027f565b604080519115158252519081900360200190f35b610115600480360360808110156100f357600080fd5b508035906020810135906001600160a01b0360408201351690606001356102c9565b005b6101156004803603602081101561012d57600080fd5b50356001600160a01b03166102cf565b6101456102d2565b604080516001600160a01b039092168252519081900360200190f35b6101456004803603602081101561017757600080fd5b81019060208101813564010000000081111561019257600080fd5b8201836020820111156101a457600080fd5b803590602001918460018302840111640100000000831117156101c657600080fd5b91908080601f0160208091040260200160405190810160405280939291908181526020018383808284376000920191909152509295506102e1945050505050565b6101156004803603606081101561021d57600080fd5b508035906001600160a01b0360208201351690604001356103bd565b6101156103c2565b61026d6004803603604081101561025757600080fd5b50803590602001356001600160a01b03166103c4565b60408051918252519081900360200190f35b60006102ae6040518060400160405280600c81526020016b27ab26afa83937b837b9b2b960a11b8152506102e1565b6001600160a01b0316826001600160a01b0316149050919050565b50505050565b50565b6000546001600160a01b031681565b6000805460405163bf40fac160e01b81526020600482018181528551602484015285516001600160a01b039094169363bf40fac19387938392604490920191908501908083838b5b83811015610341578181015183820152602001610329565b50505050905090810190601f16801561036e5780820380516001836020036101000a031916815260200191505b509250505060206040518083038186803b15801561038b57600080fd5b505afa15801561039f573d6000803e3d6000fd5b505050506040513d60208110156103b557600080fd5b505192915050565b505050565b565b60009291505056fea26469706673582212203c88b151a9098fd385f72116ea504d04ab99ce35bdd2be87a9d0b1a4e0f1717464736f6c63430007060033",
"deployedBytecode": "0x608060405234801561001057600080fd5b506004361061009e5760003560e01c8063abfbbe1311610066578063abfbbe1314610207578063bc2f8dd814610239578063c5b6aa2f14610239578063d0e30db014610239578063dc6453dc146102415761009e565b806302ad4d2a146100a35780631e16e92f146100dd5780631e83409a14610117578063299ca4781461013d578063461a447814610161575b600080fd5b6100c9600480360360208110156100b957600080fd5b50356001600160a01b031661027f565b604080519115158252519081900360200190f35b610115600480360360808110156100f357600080fd5b508035906020810135906001600160a01b0360408201351690606001356102c9565b005b6101156004803603602081101561012d57600080fd5b50356001600160a01b03166102cf565b6101456102d2565b604080516001600160a01b039092168252519081900360200190f35b6101456004803603602081101561017757600080fd5b81019060208101813564010000000081111561019257600080fd5b8201836020820111156101a457600080fd5b803590602001918460018302840111640100000000831117156101c657600080fd5b91908080601f0160208091040260200160405190810160405280939291908181526020018383808284376000920191909152509295506102e1945050505050565b6101156004803603606081101561021d57600080fd5b508035906001600160a01b0360208201351690604001356103bd565b6101156103c2565b61026d6004803603604081101561025757600080fd5b50803590602001356001600160a01b03166103c4565b60408051918252519081900360200190f35b60006102ae6040518060400160405280600c81526020016b27ab26afa83937b837b9b2b960a11b8152506102e1565b6001600160a01b0316826001600160a01b0316149050919050565b50505050565b50565b6000546001600160a01b031681565b6000805460405163bf40fac160e01b81526020600482018181528551602484015285516001600160a01b039094169363bf40fac19387938392604490920191908501908083838b5b83811015610341578181015183820152602001610329565b50505050905090810190601f16801561036e5780820380516001836020036101000a031916815260200191505b509250505060206040518083038186803b15801561038b57600080fd5b505afa15801561039f573d6000803e3d6000fd5b505050506040513d60208110156103b557600080fd5b505192915050565b505050565b565b60009291505056fea26469706673582212203c88b151a9098fd385f72116ea504d04ab99ce35bdd2be87a9d0b1a4e0f1717464736f6c63430007060033",
"devdoc": {
"kind": "dev",
"methods": {},
"methods": {
"resolve(string)": {
"params": {
"_name": "Name to resolve an address for."
},
"returns": {
"_0": "Address associated with the given name."
}
}
},
"title": "mockOVM_BondManager",
"version": 1
},
"userdoc": {
"kind": "user",
"methods": {},
"methods": {
"resolve(string)": {
"notice": "Resolves the address associated with a given name."
}
},
"version": 1
},
"storageLayout": {
"storage": [
{
"astId": 12554,
"astId": 12856,
"contract": "contracts/optimistic-ethereum/mockOVM/verification/mockOVM_BondManager.sol:mockOVM_BondManager",
"label": "libAddressManager",
"offset": 0,
"slot": "0",
"type": "t_contract(Lib_AddressManager)12547"
"type": "t_contract(Lib_AddressManager)12849"
}
],
"types": {
"t_contract(Lib_AddressManager)12547": {
"t_contract(Lib_AddressManager)12849": {
"encoding": "inplace",
"label": "contract Lib_AddressManager",
"numberOfBytes": "20"
......
This source diff could not be displayed because it is too large. You can view the blob instead.
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment