From 4d406e520fdf54281e70d067b54934c8e296156d Mon Sep 17 00:00:00 2001 From: Mark Tyneway Date: Wed, 16 Aug 2023 15:30:45 -0700 Subject: [PATCH 1/7] bindings: regenerate --- .../bindings/optimismmintableerc20factory.go | 194 +++++++++++++++++- .../optimismmintableerc20factory_more.go | 4 +- 2 files changed, 192 insertions(+), 6 deletions(-) diff --git a/op-bindings/bindings/optimismmintableerc20factory.go b/op-bindings/bindings/optimismmintableerc20factory.go index ce3796b500a5..3ed2bbe31d10 100644 --- a/op-bindings/bindings/optimismmintableerc20factory.go +++ b/op-bindings/bindings/optimismmintableerc20factory.go @@ -30,8 +30,8 @@ var ( // OptimismMintableERC20FactoryMetaData contains all meta data concerning the OptimismMintableERC20Factory contract. var OptimismMintableERC20FactoryMetaData = &bind.MetaData{ - ABI: "[{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_bridge\",\"type\":\"address\"}],\"stateMutability\":\"nonpayable\",\"type\":\"constructor\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"localToken\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"remoteToken\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"address\",\"name\":\"deployer\",\"type\":\"address\"}],\"name\":\"OptimismMintableERC20Created\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"remoteToken\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"localToken\",\"type\":\"address\"}],\"name\":\"StandardL2TokenCreated\",\"type\":\"event\"},{\"inputs\":[],\"name\":\"BRIDGE\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_remoteToken\",\"type\":\"address\"},{\"internalType\":\"string\",\"name\":\"_name\",\"type\":\"string\"},{\"internalType\":\"string\",\"name\":\"_symbol\",\"type\":\"string\"}],\"name\":\"createOptimismMintableERC20\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_remoteToken\",\"type\":\"address\"},{\"internalType\":\"string\",\"name\":\"_name\",\"type\":\"string\"},{\"internalType\":\"string\",\"name\":\"_symbol\",\"type\":\"string\"}],\"name\":\"createStandardL2Token\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"version\",\"outputs\":[{\"internalType\":\"string\",\"name\":\"\",\"type\":\"string\"}],\"stateMutability\":\"view\",\"type\":\"function\"}]", - Bin: "0x61010060405234801561001157600080fd5b506040516124bb3803806124bb83398101604081905261003091610050565b6001608052600260a052600060c0526001600160a01b031660e052610080565b60006020828403121561006257600080fd5b81516001600160a01b038116811461007957600080fd5b9392505050565b60805160a05160c05160e0516123fd6100be6000396000818160d3015261029701526000610153015260006101280152600060fd01526123fd6000f3fe60806040523480156200001157600080fd5b5060043610620000525760003560e01c806354fd4d501462000057578063896f93d11462000079578063ce5ac90f14620000b6578063ee9a31a214620000cd575b600080fd5b62000061620000f5565b60405162000070919062000587565b60405180910390f35b620000906200008a36600462000685565b620001a0565b60405173ffffffffffffffffffffffffffffffffffffffff909116815260200162000070565b62000090620000c736600462000685565b620001b7565b620000907f000000000000000000000000000000000000000000000000000000000000000081565b6060620001227f0000000000000000000000000000000000000000000000000000000000000000620003ad565b6200014d7f0000000000000000000000000000000000000000000000000000000000000000620003ad565b620001787f0000000000000000000000000000000000000000000000000000000000000000620003ad565b6040516020016200018c939291906200071c565b604051602081830303815290604052905090565b6000620001af848484620001b7565b949350505050565b600073ffffffffffffffffffffffffffffffffffffffff841662000261576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152603f60248201527f4f7074696d69736d4d696e7461626c654552433230466163746f72793a206d7560448201527f73742070726f766964652072656d6f746520746f6b656e206164647265737300606482015260840160405180910390fd5b60008484846040516020016200027a9392919062000798565b6040516020818303038152906040528051906020012090506000817f0000000000000000000000000000000000000000000000000000000000000000878787604051620002c790620004fa565b620002d69493929190620007e7565b8190604051809103906000f5905080158015620002f7573d6000803e3d6000fd5b5090508073ffffffffffffffffffffffffffffffffffffffff168673ffffffffffffffffffffffffffffffffffffffff167fceeb8e7d520d7f3b65fc11a262b91066940193b05d4f93df07cfdced0eb551cf60405160405180910390a360405133815273ffffffffffffffffffffffffffffffffffffffff80881691908316907f52fe89dd5930f343d25650b62fd367bae47088bcddffd2a88350a6ecdd620cdb9060200160405180910390a395945050505050565b606081600003620003f157505060408051808201909152600181527f3000000000000000000000000000000000000000000000000000000000000000602082015290565b8160005b8115620004215780620004088162000870565b9150620004199050600a83620008da565b9150620003f5565b60008167ffffffffffffffff8111156200043f576200043f620005a3565b6040519080825280601f01601f1916602001820160405280156200046a576020820181803683370190505b5090505b8415620001af5762000482600183620008f1565b915062000491600a866200090b565b6200049e90603062000922565b60f81b818381518110620004b657620004b66200093d565b60200101907effffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916908160001a905350620004f2600a86620008da565b94506200046e565b611a84806200096d83390190565b60005b83811015620005255781810151838201526020016200050b565b8381111562000535576000848401525b50505050565b600081518084526200055581602086016020860162000508565b601f017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0169290920160200192915050565b6020815260006200059c60208301846200053b565b9392505050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b600082601f830112620005e457600080fd5b813567ffffffffffffffff80821115620006025762000602620005a3565b604051601f83017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0908116603f011681019082821181831017156200064b576200064b620005a3565b816040528381528660208588010111156200066557600080fd5b836020870160208301376000602085830101528094505050505092915050565b6000806000606084860312156200069b57600080fd5b833573ffffffffffffffffffffffffffffffffffffffff81168114620006c057600080fd5b9250602084013567ffffffffffffffff80821115620006de57600080fd5b620006ec87838801620005d2565b935060408601359150808211156200070357600080fd5b506200071286828701620005d2565b9150509250925092565b600084516200073081846020890162000508565b80830190507f2e0000000000000000000000000000000000000000000000000000000000000080825285516200076e816001850160208a0162000508565b600192019182015283516200078b81600284016020880162000508565b0160020195945050505050565b73ffffffffffffffffffffffffffffffffffffffff84168152606060208201526000620007c960608301856200053b565b8281036040840152620007dd81856200053b565b9695505050505050565b600073ffffffffffffffffffffffffffffffffffffffff8087168352808616602084015250608060408301526200082260808301856200053b565b82810360608401526200083681856200053b565b979650505050505050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fd5b60007fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff8203620008a457620008a462000841565b5060010190565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601260045260246000fd5b600082620008ec57620008ec620008ab565b500490565b60008282101562000906576200090662000841565b500390565b6000826200091d576200091d620008ab565b500690565b6000821982111562000938576200093862000841565b500190565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fdfe6101206040523480156200001257600080fd5b5060405162001a8438038062001a8483398101604081905262000035916200016d565b6001806000848460036200004a83826200028c565b5060046200005982826200028c565b50505060809290925260a05260c05250506001600160a01b0390811660e052166101005262000358565b80516001600160a01b03811681146200009b57600080fd5b919050565b634e487b7160e01b600052604160045260246000fd5b600082601f830112620000c857600080fd5b81516001600160401b0380821115620000e557620000e5620000a0565b604051601f8301601f19908116603f01168101908282118183101715620001105762000110620000a0565b816040528381526020925086838588010111156200012d57600080fd5b600091505b8382101562000151578582018301518183018401529082019062000132565b83821115620001635760008385830101525b9695505050505050565b600080600080608085870312156200018457600080fd5b6200018f8562000083565b93506200019f6020860162000083565b60408601519093506001600160401b0380821115620001bd57600080fd5b620001cb88838901620000b6565b93506060870151915080821115620001e257600080fd5b50620001f187828801620000b6565b91505092959194509250565b600181811c908216806200021257607f821691505b6020821081036200023357634e487b7160e01b600052602260045260246000fd5b50919050565b601f8211156200028757600081815260208120601f850160051c81016020861015620002625750805b601f850160051c820191505b8181101562000283578281556001016200026e565b5050505b505050565b81516001600160401b03811115620002a857620002a8620000a0565b620002c081620002b98454620001fd565b8462000239565b602080601f831160018114620002f85760008415620002df5750858301515b600019600386901b1c1916600185901b17855562000283565b600085815260208120601f198616915b82811015620003295788860151825594840194600190910190840162000308565b5085821015620003485787850151600019600388901b60f8161c191681555b5050505050600190811b01905550565b60805160a05160c05160e051610100516116cb620003b9600039600081816102f50152818161038a015281816105cf01526107a90152600081816101a9015261031b015260006107380152600061070f015260006106e601526116cb6000f3fe608060405234801561001057600080fd5b50600436106101775760003560e01c806370a08231116100d8578063ae1f6aaf1161008c578063dd62ed3e11610066578063dd62ed3e1461033f578063e78cea92146102f3578063ee9a31a21461038557600080fd5b8063ae1f6aaf146102f3578063c01e1bd614610319578063d6c0b2c41461031957600080fd5b80639dc29fac116100bd5780639dc29fac146102ba578063a457c2d7146102cd578063a9059cbb146102e057600080fd5b806370a082311461027c57806395d89b41146102b257600080fd5b806323b872dd1161012f5780633950935111610114578063395093511461024c57806340c10f191461025f57806354fd4d501461027457600080fd5b806323b872dd1461022a578063313ce5671461023d57600080fd5b806306fdde031161016057806306fdde03146101f0578063095ea7b31461020557806318160ddd1461021857600080fd5b806301ffc9a71461017c578063033964be146101a4575b600080fd5b61018f61018a366004611307565b6103ac565b60405190151581526020015b60405180910390f35b6101cb7f000000000000000000000000000000000000000000000000000000000000000081565b60405173ffffffffffffffffffffffffffffffffffffffff909116815260200161019b565b6101f861049d565b60405161019b919061137c565b61018f6102133660046113f6565b61052f565b6002545b60405190815260200161019b565b61018f610238366004611420565b610547565b6040516012815260200161019b565b61018f61025a3660046113f6565b61056b565b61027261026d3660046113f6565b6105b7565b005b6101f86106df565b61021c61028a36600461145c565b73ffffffffffffffffffffffffffffffffffffffff1660009081526020819052604090205490565b6101f8610782565b6102726102c83660046113f6565b610791565b61018f6102db3660046113f6565b6108a8565b61018f6102ee3660046113f6565b610979565b7f00000000000000000000000000000000000000000000000000000000000000006101cb565b7f00000000000000000000000000000000000000000000000000000000000000006101cb565b61021c61034d366004611477565b73ffffffffffffffffffffffffffffffffffffffff918216600090815260016020908152604080832093909416825291909152205490565b6101cb7f000000000000000000000000000000000000000000000000000000000000000081565b60007f01ffc9a7000000000000000000000000000000000000000000000000000000007f1d1d8b63000000000000000000000000000000000000000000000000000000007fec4fc8e3000000000000000000000000000000000000000000000000000000007fffffffff00000000000000000000000000000000000000000000000000000000851683148061046557507fffffffff00000000000000000000000000000000000000000000000000000000858116908316145b8061049457507fffffffff00000000000000000000000000000000000000000000000000000000858116908216145b95945050505050565b6060600380546104ac906114aa565b80601f01602080910402602001604051908101604052809291908181526020018280546104d8906114aa565b80156105255780601f106104fa57610100808354040283529160200191610525565b820191906000526020600020905b81548152906001019060200180831161050857829003601f168201915b5050505050905090565b60003361053d818585610987565b5060019392505050565b600033610555858285610b3b565b610560858585610c12565b506001949350505050565b33600081815260016020908152604080832073ffffffffffffffffffffffffffffffffffffffff8716845290915281205490919061053d90829086906105b290879061152c565b610987565b3373ffffffffffffffffffffffffffffffffffffffff7f00000000000000000000000000000000000000000000000000000000000000001614610681576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152603460248201527f4f7074696d69736d4d696e7461626c6545524332303a206f6e6c79206272696460448201527f67652063616e206d696e7420616e64206275726e00000000000000000000000060648201526084015b60405180910390fd5b61068b8282610ec5565b8173ffffffffffffffffffffffffffffffffffffffff167f0f6798a560793a54c3bcfe86a93cde1e73087d944c0ea20544137d4121396885826040516106d391815260200190565b60405180910390a25050565b606061070a7f0000000000000000000000000000000000000000000000000000000000000000610fe5565b6107337f0000000000000000000000000000000000000000000000000000000000000000610fe5565b61075c7f0000000000000000000000000000000000000000000000000000000000000000610fe5565b60405160200161076e93929190611544565b604051602081830303815290604052905090565b6060600480546104ac906114aa565b3373ffffffffffffffffffffffffffffffffffffffff7f00000000000000000000000000000000000000000000000000000000000000001614610856576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152603460248201527f4f7074696d69736d4d696e7461626c6545524332303a206f6e6c79206272696460448201527f67652063616e206d696e7420616e64206275726e0000000000000000000000006064820152608401610678565b6108608282611122565b8173ffffffffffffffffffffffffffffffffffffffff167fcc16f5dbb4873280815c1ee09dbd06736cffcc184412cf7a71a0fdb75d397ca5826040516106d391815260200190565b33600081815260016020908152604080832073ffffffffffffffffffffffffffffffffffffffff871684529091528120549091908381101561096c576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602560248201527f45524332303a2064656372656173656420616c6c6f77616e63652062656c6f7760448201527f207a65726f0000000000000000000000000000000000000000000000000000006064820152608401610678565b6105608286868403610987565b60003361053d818585610c12565b73ffffffffffffffffffffffffffffffffffffffff8316610a29576040517f08c379a0000000000000000000000000000000000000000000000000000000008152602060048201526024808201527f45524332303a20617070726f76652066726f6d20746865207a65726f2061646460448201527f72657373000000000000000000000000000000000000000000000000000000006064820152608401610678565b73ffffffffffffffffffffffffffffffffffffffff8216610acc576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602260248201527f45524332303a20617070726f766520746f20746865207a65726f20616464726560448201527f73730000000000000000000000000000000000000000000000000000000000006064820152608401610678565b73ffffffffffffffffffffffffffffffffffffffff83811660008181526001602090815260408083209487168084529482529182902085905590518481527f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b92591015b60405180910390a3505050565b73ffffffffffffffffffffffffffffffffffffffff8381166000908152600160209081526040808320938616835292905220547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff8114610c0c5781811015610bff576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601d60248201527f45524332303a20696e73756666696369656e7420616c6c6f77616e63650000006044820152606401610678565b610c0c8484848403610987565b50505050565b73ffffffffffffffffffffffffffffffffffffffff8316610cb5576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602560248201527f45524332303a207472616e736665722066726f6d20746865207a65726f20616460448201527f64726573730000000000000000000000000000000000000000000000000000006064820152608401610678565b73ffffffffffffffffffffffffffffffffffffffff8216610d58576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602360248201527f45524332303a207472616e7366657220746f20746865207a65726f206164647260448201527f65737300000000000000000000000000000000000000000000000000000000006064820152608401610678565b73ffffffffffffffffffffffffffffffffffffffff831660009081526020819052604090205481811015610e0e576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602660248201527f45524332303a207472616e7366657220616d6f756e742065786365656473206260448201527f616c616e636500000000000000000000000000000000000000000000000000006064820152608401610678565b73ffffffffffffffffffffffffffffffffffffffff808516600090815260208190526040808220858503905591851681529081208054849290610e5290849061152c565b925050819055508273ffffffffffffffffffffffffffffffffffffffff168473ffffffffffffffffffffffffffffffffffffffff167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef84604051610eb891815260200190565b60405180910390a3610c0c565b73ffffffffffffffffffffffffffffffffffffffff8216610f42576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601f60248201527f45524332303a206d696e7420746f20746865207a65726f2061646472657373006044820152606401610678565b8060026000828254610f54919061152c565b909155505073ffffffffffffffffffffffffffffffffffffffff821660009081526020819052604081208054839290610f8e90849061152c565b909155505060405181815273ffffffffffffffffffffffffffffffffffffffff8316906000907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef9060200160405180910390a35050565b60608160000361102857505060408051808201909152600181527f3000000000000000000000000000000000000000000000000000000000000000602082015290565b8160005b8115611052578061103c816115ba565b915061104b9050600a83611621565b915061102c565b60008167ffffffffffffffff81111561106d5761106d611635565b6040519080825280601f01601f191660200182016040528015611097576020820181803683370190505b5090505b841561111a576110ac600183611664565b91506110b9600a8661167b565b6110c490603061152c565b60f81b8183815181106110d9576110d961168f565b60200101907effffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916908160001a905350611113600a86611621565b945061109b565b949350505050565b73ffffffffffffffffffffffffffffffffffffffff82166111c5576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602160248201527f45524332303a206275726e2066726f6d20746865207a65726f2061646472657360448201527f73000000000000000000000000000000000000000000000000000000000000006064820152608401610678565b73ffffffffffffffffffffffffffffffffffffffff82166000908152602081905260409020548181101561127b576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602260248201527f45524332303a206275726e20616d6f756e7420657863656564732062616c616e60448201527f63650000000000000000000000000000000000000000000000000000000000006064820152608401610678565b73ffffffffffffffffffffffffffffffffffffffff831660009081526020819052604081208383039055600280548492906112b7908490611664565b909155505060405182815260009073ffffffffffffffffffffffffffffffffffffffff8516907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef90602001610b2e565b60006020828403121561131957600080fd5b81357fffffffff000000000000000000000000000000000000000000000000000000008116811461134957600080fd5b9392505050565b60005b8381101561136b578181015183820152602001611353565b83811115610c0c5750506000910152565b602081526000825180602084015261139b816040850160208701611350565b601f017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0169190910160400192915050565b803573ffffffffffffffffffffffffffffffffffffffff811681146113f157600080fd5b919050565b6000806040838503121561140957600080fd5b611412836113cd565b946020939093013593505050565b60008060006060848603121561143557600080fd5b61143e846113cd565b925061144c602085016113cd565b9150604084013590509250925092565b60006020828403121561146e57600080fd5b611349826113cd565b6000806040838503121561148a57600080fd5b611493836113cd565b91506114a1602084016113cd565b90509250929050565b600181811c908216806114be57607f821691505b6020821081036114f7577f4e487b7100000000000000000000000000000000000000000000000000000000600052602260045260246000fd5b50919050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fd5b6000821982111561153f5761153f6114fd565b500190565b60008451611556818460208901611350565b80830190507f2e000000000000000000000000000000000000000000000000000000000000008082528551611592816001850160208a01611350565b600192019182015283516115ad816002840160208801611350565b0160020195945050505050565b60007fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff82036115eb576115eb6114fd565b5060010190565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601260045260246000fd5b600082611630576116306115f2565b500490565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b600082821015611676576116766114fd565b500390565b60008261168a5761168a6115f2565b500690565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fdfea164736f6c634300080f000aa164736f6c634300080f000a", + ABI: "[{\"inputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"constructor\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"uint8\",\"name\":\"version\",\"type\":\"uint8\"}],\"name\":\"Initialized\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"localToken\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"remoteToken\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"address\",\"name\":\"deployer\",\"type\":\"address\"}],\"name\":\"OptimismMintableERC20Created\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"remoteToken\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"localToken\",\"type\":\"address\"}],\"name\":\"StandardL2TokenCreated\",\"type\":\"event\"},{\"inputs\":[],\"name\":\"BRIDGE\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"bridge\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_remoteToken\",\"type\":\"address\"},{\"internalType\":\"string\",\"name\":\"_name\",\"type\":\"string\"},{\"internalType\":\"string\",\"name\":\"_symbol\",\"type\":\"string\"}],\"name\":\"createOptimismMintableERC20\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_remoteToken\",\"type\":\"address\"},{\"internalType\":\"string\",\"name\":\"_name\",\"type\":\"string\"},{\"internalType\":\"string\",\"name\":\"_symbol\",\"type\":\"string\"}],\"name\":\"createStandardL2Token\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_bridge\",\"type\":\"address\"}],\"name\":\"initialize\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"version\",\"outputs\":[{\"internalType\":\"string\",\"name\":\"\",\"type\":\"string\"}],\"stateMutability\":\"view\",\"type\":\"function\"}]", + Bin: "0x60e060405234801561001057600080fd5b506001608052600360a052600060c081905261002b90610030565b610128565b600054600290610100900460ff16158015610052575060005460ff8083169116105b6100b95760405162461bcd60e51b815260206004820152602e60248201527f496e697469616c697a61626c653a20636f6e747261637420697320616c72656160448201526d191e481a5b9a5d1a585b1a5e995960921b606482015260840160405180910390fd5b6000805461010060ff841661ffff19909216821717610100600160b01b03191661ff0019620100006001600160a01b0387160216179091556040519081527f7f26b83ff96e1f2b6a682f133852f6798a09c465da95921460cefb38474024989060200160405180910390a15050565b60805160a05160c05161261261015760003960006101b90152600061018e0152600061016301526126126000f3fe60806040523480156200001157600080fd5b50600436106200007b5760003560e01c8063ce5ac90f1162000056578063ce5ac90f14620000f8578063e78cea92146200010f578063ee9a31a2146200013657600080fd5b806354fd4d501462000080578063896f93d114620000a2578063c4d66de814620000df575b600080fd5b6200008a6200015b565b6040516200009991906200076e565b60405180910390f35b620000b9620000b336600462000896565b62000206565b60405173ffffffffffffffffffffffffffffffffffffffff909116815260200162000099565b620000f6620000f036600462000913565b6200021d565b005b620000b96200010936600462000896565b6200039f565b600054620000b99062010000900473ffffffffffffffffffffffffffffffffffffffff1681565b60005462010000900473ffffffffffffffffffffffffffffffffffffffff16620000b9565b6060620001887f000000000000000000000000000000000000000000000000000000000000000062000594565b620001b37f000000000000000000000000000000000000000000000000000000000000000062000594565b620001de7f000000000000000000000000000000000000000000000000000000000000000062000594565b604051602001620001f29392919062000931565b604051602081830303815290604052905090565b6000620002158484846200039f565b949350505050565b600054600290610100900460ff1615801562000240575060005460ff8083169116105b620002d2576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602e60248201527f496e697469616c697a61626c653a20636f6e747261637420697320616c72656160448201527f647920696e697469616c697a656400000000000000000000000000000000000060648201526084015b60405180910390fd5b6000805461010060ff84167fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff00009092168217177fffffffffffffffffffff000000000000000000000000000000000000000000ff167fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff00ff6201000073ffffffffffffffffffffffffffffffffffffffff87160216179091556040519081527f7f26b83ff96e1f2b6a682f133852f6798a09c465da95921460cefb38474024989060200160405180910390a15050565b600073ffffffffffffffffffffffffffffffffffffffff841662000446576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152603f60248201527f4f7074696d69736d4d696e7461626c654552433230466163746f72793a206d7560448201527f73742070726f766964652072656d6f746520746f6b656e2061646472657373006064820152608401620002c9565b60008484846040516020016200045f93929190620009ad565b604051602081830303815290604052805190602001209050600081600060029054906101000a900473ffffffffffffffffffffffffffffffffffffffff16878787604051620004ae90620006e1565b620004bd9493929190620009fc565b8190604051809103906000f5905080158015620004de573d6000803e3d6000fd5b5090508073ffffffffffffffffffffffffffffffffffffffff168673ffffffffffffffffffffffffffffffffffffffff167fceeb8e7d520d7f3b65fc11a262b91066940193b05d4f93df07cfdced0eb551cf60405160405180910390a360405133815273ffffffffffffffffffffffffffffffffffffffff80881691908316907f52fe89dd5930f343d25650b62fd367bae47088bcddffd2a88350a6ecdd620cdb9060200160405180910390a395945050505050565b606081600003620005d857505060408051808201909152600181527f3000000000000000000000000000000000000000000000000000000000000000602082015290565b8160005b8115620006085780620005ef8162000a85565b9150620006009050600a8362000aef565b9150620005dc565b60008167ffffffffffffffff811115620006265762000626620007b4565b6040519080825280601f01601f19166020018201604052801562000651576020820181803683370190505b5090505b841562000215576200066960018362000b06565b915062000678600a8662000b20565b6200068590603062000b37565b60f81b8183815181106200069d576200069d62000b52565b60200101907effffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916908160001a905350620006d9600a8662000aef565b945062000655565b611a848062000b8283390190565b60005b838110156200070c578181015183820152602001620006f2565b838111156200071c576000848401525b50505050565b600081518084526200073c816020860160208601620006ef565b601f017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0169290920160200192915050565b60208152600062000783602083018462000722565b9392505050565b803573ffffffffffffffffffffffffffffffffffffffff81168114620007af57600080fd5b919050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b600082601f830112620007f557600080fd5b813567ffffffffffffffff80821115620008135762000813620007b4565b604051601f83017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0908116603f011681019082821181831017156200085c576200085c620007b4565b816040528381528660208588010111156200087657600080fd5b836020870160208301376000602085830101528094505050505092915050565b600080600060608486031215620008ac57600080fd5b620008b7846200078a565b9250602084013567ffffffffffffffff80821115620008d557600080fd5b620008e387838801620007e3565b93506040860135915080821115620008fa57600080fd5b506200090986828701620007e3565b9150509250925092565b6000602082840312156200092657600080fd5b62000783826200078a565b6000845162000945818460208901620006ef565b80830190507f2e00000000000000000000000000000000000000000000000000000000000000808252855162000983816001850160208a01620006ef565b60019201918201528351620009a0816002840160208801620006ef565b0160020195945050505050565b73ffffffffffffffffffffffffffffffffffffffff84168152606060208201526000620009de606083018562000722565b8281036040840152620009f2818562000722565b9695505050505050565b600073ffffffffffffffffffffffffffffffffffffffff80871683528086166020840152506080604083015262000a37608083018562000722565b828103606084015262000a4b818562000722565b979650505050505050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fd5b60007fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff820362000ab95762000ab962000a56565b5060010190565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601260045260246000fd5b60008262000b015762000b0162000ac0565b500490565b60008282101562000b1b5762000b1b62000a56565b500390565b60008262000b325762000b3262000ac0565b500690565b6000821982111562000b4d5762000b4d62000a56565b500190565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fdfe6101206040523480156200001257600080fd5b5060405162001a8438038062001a8483398101604081905262000035916200016d565b6001806000848460036200004a83826200028c565b5060046200005982826200028c565b50505060809290925260a05260c05250506001600160a01b0390811660e052166101005262000358565b80516001600160a01b03811681146200009b57600080fd5b919050565b634e487b7160e01b600052604160045260246000fd5b600082601f830112620000c857600080fd5b81516001600160401b0380821115620000e557620000e5620000a0565b604051601f8301601f19908116603f01168101908282118183101715620001105762000110620000a0565b816040528381526020925086838588010111156200012d57600080fd5b600091505b8382101562000151578582018301518183018401529082019062000132565b83821115620001635760008385830101525b9695505050505050565b600080600080608085870312156200018457600080fd5b6200018f8562000083565b93506200019f6020860162000083565b60408601519093506001600160401b0380821115620001bd57600080fd5b620001cb88838901620000b6565b93506060870151915080821115620001e257600080fd5b50620001f187828801620000b6565b91505092959194509250565b600181811c908216806200021257607f821691505b6020821081036200023357634e487b7160e01b600052602260045260246000fd5b50919050565b601f8211156200028757600081815260208120601f850160051c81016020861015620002625750805b601f850160051c820191505b8181101562000283578281556001016200026e565b5050505b505050565b81516001600160401b03811115620002a857620002a8620000a0565b620002c081620002b98454620001fd565b8462000239565b602080601f831160018114620002f85760008415620002df5750858301515b600019600386901b1c1916600185901b17855562000283565b600085815260208120601f198616915b82811015620003295788860151825594840194600190910190840162000308565b5085821015620003485787850151600019600388901b60f8161c191681555b5050505050600190811b01905550565b60805160a05160c05160e051610100516116cb620003b9600039600081816102f50152818161038a015281816105cf01526107a90152600081816101a9015261031b015260006107380152600061070f015260006106e601526116cb6000f3fe608060405234801561001057600080fd5b50600436106101775760003560e01c806370a08231116100d8578063ae1f6aaf1161008c578063dd62ed3e11610066578063dd62ed3e1461033f578063e78cea92146102f3578063ee9a31a21461038557600080fd5b8063ae1f6aaf146102f3578063c01e1bd614610319578063d6c0b2c41461031957600080fd5b80639dc29fac116100bd5780639dc29fac146102ba578063a457c2d7146102cd578063a9059cbb146102e057600080fd5b806370a082311461027c57806395d89b41146102b257600080fd5b806323b872dd1161012f5780633950935111610114578063395093511461024c57806340c10f191461025f57806354fd4d501461027457600080fd5b806323b872dd1461022a578063313ce5671461023d57600080fd5b806306fdde031161016057806306fdde03146101f0578063095ea7b31461020557806318160ddd1461021857600080fd5b806301ffc9a71461017c578063033964be146101a4575b600080fd5b61018f61018a366004611307565b6103ac565b60405190151581526020015b60405180910390f35b6101cb7f000000000000000000000000000000000000000000000000000000000000000081565b60405173ffffffffffffffffffffffffffffffffffffffff909116815260200161019b565b6101f861049d565b60405161019b919061137c565b61018f6102133660046113f6565b61052f565b6002545b60405190815260200161019b565b61018f610238366004611420565b610547565b6040516012815260200161019b565b61018f61025a3660046113f6565b61056b565b61027261026d3660046113f6565b6105b7565b005b6101f86106df565b61021c61028a36600461145c565b73ffffffffffffffffffffffffffffffffffffffff1660009081526020819052604090205490565b6101f8610782565b6102726102c83660046113f6565b610791565b61018f6102db3660046113f6565b6108a8565b61018f6102ee3660046113f6565b610979565b7f00000000000000000000000000000000000000000000000000000000000000006101cb565b7f00000000000000000000000000000000000000000000000000000000000000006101cb565b61021c61034d366004611477565b73ffffffffffffffffffffffffffffffffffffffff918216600090815260016020908152604080832093909416825291909152205490565b6101cb7f000000000000000000000000000000000000000000000000000000000000000081565b60007f01ffc9a7000000000000000000000000000000000000000000000000000000007f1d1d8b63000000000000000000000000000000000000000000000000000000007fec4fc8e3000000000000000000000000000000000000000000000000000000007fffffffff00000000000000000000000000000000000000000000000000000000851683148061046557507fffffffff00000000000000000000000000000000000000000000000000000000858116908316145b8061049457507fffffffff00000000000000000000000000000000000000000000000000000000858116908216145b95945050505050565b6060600380546104ac906114aa565b80601f01602080910402602001604051908101604052809291908181526020018280546104d8906114aa565b80156105255780601f106104fa57610100808354040283529160200191610525565b820191906000526020600020905b81548152906001019060200180831161050857829003601f168201915b5050505050905090565b60003361053d818585610987565b5060019392505050565b600033610555858285610b3b565b610560858585610c12565b506001949350505050565b33600081815260016020908152604080832073ffffffffffffffffffffffffffffffffffffffff8716845290915281205490919061053d90829086906105b290879061152c565b610987565b3373ffffffffffffffffffffffffffffffffffffffff7f00000000000000000000000000000000000000000000000000000000000000001614610681576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152603460248201527f4f7074696d69736d4d696e7461626c6545524332303a206f6e6c79206272696460448201527f67652063616e206d696e7420616e64206275726e00000000000000000000000060648201526084015b60405180910390fd5b61068b8282610ec5565b8173ffffffffffffffffffffffffffffffffffffffff167f0f6798a560793a54c3bcfe86a93cde1e73087d944c0ea20544137d4121396885826040516106d391815260200190565b60405180910390a25050565b606061070a7f0000000000000000000000000000000000000000000000000000000000000000610fe5565b6107337f0000000000000000000000000000000000000000000000000000000000000000610fe5565b61075c7f0000000000000000000000000000000000000000000000000000000000000000610fe5565b60405160200161076e93929190611544565b604051602081830303815290604052905090565b6060600480546104ac906114aa565b3373ffffffffffffffffffffffffffffffffffffffff7f00000000000000000000000000000000000000000000000000000000000000001614610856576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152603460248201527f4f7074696d69736d4d696e7461626c6545524332303a206f6e6c79206272696460448201527f67652063616e206d696e7420616e64206275726e0000000000000000000000006064820152608401610678565b6108608282611122565b8173ffffffffffffffffffffffffffffffffffffffff167fcc16f5dbb4873280815c1ee09dbd06736cffcc184412cf7a71a0fdb75d397ca5826040516106d391815260200190565b33600081815260016020908152604080832073ffffffffffffffffffffffffffffffffffffffff871684529091528120549091908381101561096c576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602560248201527f45524332303a2064656372656173656420616c6c6f77616e63652062656c6f7760448201527f207a65726f0000000000000000000000000000000000000000000000000000006064820152608401610678565b6105608286868403610987565b60003361053d818585610c12565b73ffffffffffffffffffffffffffffffffffffffff8316610a29576040517f08c379a0000000000000000000000000000000000000000000000000000000008152602060048201526024808201527f45524332303a20617070726f76652066726f6d20746865207a65726f2061646460448201527f72657373000000000000000000000000000000000000000000000000000000006064820152608401610678565b73ffffffffffffffffffffffffffffffffffffffff8216610acc576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602260248201527f45524332303a20617070726f766520746f20746865207a65726f20616464726560448201527f73730000000000000000000000000000000000000000000000000000000000006064820152608401610678565b73ffffffffffffffffffffffffffffffffffffffff83811660008181526001602090815260408083209487168084529482529182902085905590518481527f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b92591015b60405180910390a3505050565b73ffffffffffffffffffffffffffffffffffffffff8381166000908152600160209081526040808320938616835292905220547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff8114610c0c5781811015610bff576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601d60248201527f45524332303a20696e73756666696369656e7420616c6c6f77616e63650000006044820152606401610678565b610c0c8484848403610987565b50505050565b73ffffffffffffffffffffffffffffffffffffffff8316610cb5576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602560248201527f45524332303a207472616e736665722066726f6d20746865207a65726f20616460448201527f64726573730000000000000000000000000000000000000000000000000000006064820152608401610678565b73ffffffffffffffffffffffffffffffffffffffff8216610d58576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602360248201527f45524332303a207472616e7366657220746f20746865207a65726f206164647260448201527f65737300000000000000000000000000000000000000000000000000000000006064820152608401610678565b73ffffffffffffffffffffffffffffffffffffffff831660009081526020819052604090205481811015610e0e576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602660248201527f45524332303a207472616e7366657220616d6f756e742065786365656473206260448201527f616c616e636500000000000000000000000000000000000000000000000000006064820152608401610678565b73ffffffffffffffffffffffffffffffffffffffff808516600090815260208190526040808220858503905591851681529081208054849290610e5290849061152c565b925050819055508273ffffffffffffffffffffffffffffffffffffffff168473ffffffffffffffffffffffffffffffffffffffff167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef84604051610eb891815260200190565b60405180910390a3610c0c565b73ffffffffffffffffffffffffffffffffffffffff8216610f42576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601f60248201527f45524332303a206d696e7420746f20746865207a65726f2061646472657373006044820152606401610678565b8060026000828254610f54919061152c565b909155505073ffffffffffffffffffffffffffffffffffffffff821660009081526020819052604081208054839290610f8e90849061152c565b909155505060405181815273ffffffffffffffffffffffffffffffffffffffff8316906000907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef9060200160405180910390a35050565b60608160000361102857505060408051808201909152600181527f3000000000000000000000000000000000000000000000000000000000000000602082015290565b8160005b8115611052578061103c816115ba565b915061104b9050600a83611621565b915061102c565b60008167ffffffffffffffff81111561106d5761106d611635565b6040519080825280601f01601f191660200182016040528015611097576020820181803683370190505b5090505b841561111a576110ac600183611664565b91506110b9600a8661167b565b6110c490603061152c565b60f81b8183815181106110d9576110d961168f565b60200101907effffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916908160001a905350611113600a86611621565b945061109b565b949350505050565b73ffffffffffffffffffffffffffffffffffffffff82166111c5576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602160248201527f45524332303a206275726e2066726f6d20746865207a65726f2061646472657360448201527f73000000000000000000000000000000000000000000000000000000000000006064820152608401610678565b73ffffffffffffffffffffffffffffffffffffffff82166000908152602081905260409020548181101561127b576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602260248201527f45524332303a206275726e20616d6f756e7420657863656564732062616c616e60448201527f63650000000000000000000000000000000000000000000000000000000000006064820152608401610678565b73ffffffffffffffffffffffffffffffffffffffff831660009081526020819052604081208383039055600280548492906112b7908490611664565b909155505060405182815260009073ffffffffffffffffffffffffffffffffffffffff8516907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef90602001610b2e565b60006020828403121561131957600080fd5b81357fffffffff000000000000000000000000000000000000000000000000000000008116811461134957600080fd5b9392505050565b60005b8381101561136b578181015183820152602001611353565b83811115610c0c5750506000910152565b602081526000825180602084015261139b816040850160208701611350565b601f017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0169190910160400192915050565b803573ffffffffffffffffffffffffffffffffffffffff811681146113f157600080fd5b919050565b6000806040838503121561140957600080fd5b611412836113cd565b946020939093013593505050565b60008060006060848603121561143557600080fd5b61143e846113cd565b925061144c602085016113cd565b9150604084013590509250925092565b60006020828403121561146e57600080fd5b611349826113cd565b6000806040838503121561148a57600080fd5b611493836113cd565b91506114a1602084016113cd565b90509250929050565b600181811c908216806114be57607f821691505b6020821081036114f7577f4e487b7100000000000000000000000000000000000000000000000000000000600052602260045260246000fd5b50919050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fd5b6000821982111561153f5761153f6114fd565b500190565b60008451611556818460208901611350565b80830190507f2e000000000000000000000000000000000000000000000000000000000000008082528551611592816001850160208a01611350565b600192019182015283516115ad816002840160208801611350565b0160020195945050505050565b60007fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff82036115eb576115eb6114fd565b5060010190565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601260045260246000fd5b600082611630576116306115f2565b500490565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b600082821015611676576116766114fd565b500390565b60008261168a5761168a6115f2565b500690565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fdfea164736f6c634300080f000aa164736f6c634300080f000a", } // OptimismMintableERC20FactoryABI is the input ABI used to generate the binding from. @@ -43,7 +43,7 @@ var OptimismMintableERC20FactoryABI = OptimismMintableERC20FactoryMetaData.ABI var OptimismMintableERC20FactoryBin = OptimismMintableERC20FactoryMetaData.Bin // DeployOptimismMintableERC20Factory deploys a new Ethereum contract, binding an instance of OptimismMintableERC20Factory to it. -func DeployOptimismMintableERC20Factory(auth *bind.TransactOpts, backend bind.ContractBackend, _bridge common.Address) (common.Address, *types.Transaction, *OptimismMintableERC20Factory, error) { +func DeployOptimismMintableERC20Factory(auth *bind.TransactOpts, backend bind.ContractBackend) (common.Address, *types.Transaction, *OptimismMintableERC20Factory, error) { parsed, err := OptimismMintableERC20FactoryMetaData.GetAbi() if err != nil { return common.Address{}, nil, nil, err @@ -52,7 +52,7 @@ func DeployOptimismMintableERC20Factory(auth *bind.TransactOpts, backend bind.Co return common.Address{}, nil, nil, errors.New("GetABI returned nil") } - address, tx, contract, err := bind.DeployContract(auth, *parsed, common.FromHex(OptimismMintableERC20FactoryBin), backend, _bridge) + address, tx, contract, err := bind.DeployContract(auth, *parsed, common.FromHex(OptimismMintableERC20FactoryBin), backend) if err != nil { return common.Address{}, nil, nil, err } @@ -232,6 +232,37 @@ func (_OptimismMintableERC20Factory *OptimismMintableERC20FactoryCallerSession) return _OptimismMintableERC20Factory.Contract.BRIDGE(&_OptimismMintableERC20Factory.CallOpts) } +// Bridge is a free data retrieval call binding the contract method 0xe78cea92. +// +// Solidity: function bridge() view returns(address) +func (_OptimismMintableERC20Factory *OptimismMintableERC20FactoryCaller) Bridge(opts *bind.CallOpts) (common.Address, error) { + var out []interface{} + err := _OptimismMintableERC20Factory.contract.Call(opts, &out, "bridge") + + if err != nil { + return *new(common.Address), err + } + + out0 := *abi.ConvertType(out[0], new(common.Address)).(*common.Address) + + return out0, err + +} + +// Bridge is a free data retrieval call binding the contract method 0xe78cea92. +// +// Solidity: function bridge() view returns(address) +func (_OptimismMintableERC20Factory *OptimismMintableERC20FactorySession) Bridge() (common.Address, error) { + return _OptimismMintableERC20Factory.Contract.Bridge(&_OptimismMintableERC20Factory.CallOpts) +} + +// Bridge is a free data retrieval call binding the contract method 0xe78cea92. +// +// Solidity: function bridge() view returns(address) +func (_OptimismMintableERC20Factory *OptimismMintableERC20FactoryCallerSession) Bridge() (common.Address, error) { + return _OptimismMintableERC20Factory.Contract.Bridge(&_OptimismMintableERC20Factory.CallOpts) +} + // Version is a free data retrieval call binding the contract method 0x54fd4d50. // // Solidity: function version() view returns(string) @@ -305,6 +336,161 @@ func (_OptimismMintableERC20Factory *OptimismMintableERC20FactoryTransactorSessi return _OptimismMintableERC20Factory.Contract.CreateStandardL2Token(&_OptimismMintableERC20Factory.TransactOpts, _remoteToken, _name, _symbol) } +// Initialize is a paid mutator transaction binding the contract method 0xc4d66de8. +// +// Solidity: function initialize(address _bridge) returns() +func (_OptimismMintableERC20Factory *OptimismMintableERC20FactoryTransactor) Initialize(opts *bind.TransactOpts, _bridge common.Address) (*types.Transaction, error) { + return _OptimismMintableERC20Factory.contract.Transact(opts, "initialize", _bridge) +} + +// Initialize is a paid mutator transaction binding the contract method 0xc4d66de8. +// +// Solidity: function initialize(address _bridge) returns() +func (_OptimismMintableERC20Factory *OptimismMintableERC20FactorySession) Initialize(_bridge common.Address) (*types.Transaction, error) { + return _OptimismMintableERC20Factory.Contract.Initialize(&_OptimismMintableERC20Factory.TransactOpts, _bridge) +} + +// Initialize is a paid mutator transaction binding the contract method 0xc4d66de8. +// +// Solidity: function initialize(address _bridge) returns() +func (_OptimismMintableERC20Factory *OptimismMintableERC20FactoryTransactorSession) Initialize(_bridge common.Address) (*types.Transaction, error) { + return _OptimismMintableERC20Factory.Contract.Initialize(&_OptimismMintableERC20Factory.TransactOpts, _bridge) +} + +// OptimismMintableERC20FactoryInitializedIterator is returned from FilterInitialized and is used to iterate over the raw logs and unpacked data for Initialized events raised by the OptimismMintableERC20Factory contract. +type OptimismMintableERC20FactoryInitializedIterator struct { + Event *OptimismMintableERC20FactoryInitialized // Event containing the contract specifics and raw log + + contract *bind.BoundContract // Generic contract to use for unpacking event data + event string // Event name to use for unpacking event data + + logs chan types.Log // Log channel receiving the found contract events + sub ethereum.Subscription // Subscription for errors, completion and termination + done bool // Whether the subscription completed delivering logs + fail error // Occurred error to stop iteration +} + +// Next advances the iterator to the subsequent event, returning whether there +// are any more events found. In case of a retrieval or parsing error, false is +// returned and Error() can be queried for the exact failure. +func (it *OptimismMintableERC20FactoryInitializedIterator) Next() bool { + // If the iterator failed, stop iterating + if it.fail != nil { + return false + } + // If the iterator completed, deliver directly whatever's available + if it.done { + select { + case log := <-it.logs: + it.Event = new(OptimismMintableERC20FactoryInitialized) + if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil { + it.fail = err + return false + } + it.Event.Raw = log + return true + + default: + return false + } + } + // Iterator still in progress, wait for either a data or an error event + select { + case log := <-it.logs: + it.Event = new(OptimismMintableERC20FactoryInitialized) + if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil { + it.fail = err + return false + } + it.Event.Raw = log + return true + + case err := <-it.sub.Err(): + it.done = true + it.fail = err + return it.Next() + } +} + +// Error returns any retrieval or parsing error occurred during filtering. +func (it *OptimismMintableERC20FactoryInitializedIterator) Error() error { + return it.fail +} + +// Close terminates the iteration process, releasing any pending underlying +// resources. +func (it *OptimismMintableERC20FactoryInitializedIterator) Close() error { + it.sub.Unsubscribe() + return nil +} + +// OptimismMintableERC20FactoryInitialized represents a Initialized event raised by the OptimismMintableERC20Factory contract. +type OptimismMintableERC20FactoryInitialized struct { + Version uint8 + Raw types.Log // Blockchain specific contextual infos +} + +// FilterInitialized is a free log retrieval operation binding the contract event 0x7f26b83ff96e1f2b6a682f133852f6798a09c465da95921460cefb3847402498. +// +// Solidity: event Initialized(uint8 version) +func (_OptimismMintableERC20Factory *OptimismMintableERC20FactoryFilterer) FilterInitialized(opts *bind.FilterOpts) (*OptimismMintableERC20FactoryInitializedIterator, error) { + + logs, sub, err := _OptimismMintableERC20Factory.contract.FilterLogs(opts, "Initialized") + if err != nil { + return nil, err + } + return &OptimismMintableERC20FactoryInitializedIterator{contract: _OptimismMintableERC20Factory.contract, event: "Initialized", logs: logs, sub: sub}, nil +} + +// WatchInitialized is a free log subscription operation binding the contract event 0x7f26b83ff96e1f2b6a682f133852f6798a09c465da95921460cefb3847402498. +// +// Solidity: event Initialized(uint8 version) +func (_OptimismMintableERC20Factory *OptimismMintableERC20FactoryFilterer) WatchInitialized(opts *bind.WatchOpts, sink chan<- *OptimismMintableERC20FactoryInitialized) (event.Subscription, error) { + + logs, sub, err := _OptimismMintableERC20Factory.contract.WatchLogs(opts, "Initialized") + if err != nil { + return nil, err + } + return event.NewSubscription(func(quit <-chan struct{}) error { + defer sub.Unsubscribe() + for { + select { + case log := <-logs: + // New log arrived, parse the event and forward to the user + event := new(OptimismMintableERC20FactoryInitialized) + if err := _OptimismMintableERC20Factory.contract.UnpackLog(event, "Initialized", log); err != nil { + return err + } + event.Raw = log + + select { + case sink <- event: + case err := <-sub.Err(): + return err + case <-quit: + return nil + } + case err := <-sub.Err(): + return err + case <-quit: + return nil + } + } + }), nil +} + +// ParseInitialized is a log parse operation binding the contract event 0x7f26b83ff96e1f2b6a682f133852f6798a09c465da95921460cefb3847402498. +// +// Solidity: event Initialized(uint8 version) +func (_OptimismMintableERC20Factory *OptimismMintableERC20FactoryFilterer) ParseInitialized(log types.Log) (*OptimismMintableERC20FactoryInitialized, error) { + event := new(OptimismMintableERC20FactoryInitialized) + if err := _OptimismMintableERC20Factory.contract.UnpackLog(event, "Initialized", log); err != nil { + return nil, err + } + event.Raw = log + return event, nil +} + // OptimismMintableERC20FactoryOptimismMintableERC20CreatedIterator is returned from FilterOptimismMintableERC20Created and is used to iterate over the raw logs and unpacked data for OptimismMintableERC20Created events raised by the OptimismMintableERC20Factory contract. type OptimismMintableERC20FactoryOptimismMintableERC20CreatedIterator struct { Event *OptimismMintableERC20FactoryOptimismMintableERC20Created // Event containing the contract specifics and raw log diff --git a/op-bindings/bindings/optimismmintableerc20factory_more.go b/op-bindings/bindings/optimismmintableerc20factory_more.go index b248a229246b..47d2efdbccd5 100644 --- a/op-bindings/bindings/optimismmintableerc20factory_more.go +++ b/op-bindings/bindings/optimismmintableerc20factory_more.go @@ -9,11 +9,11 @@ import ( "github.com/ethereum-optimism/optimism/op-bindings/solc" ) -const OptimismMintableERC20FactoryStorageLayoutJSON = "{\"storage\":null,\"types\":{}}" +const OptimismMintableERC20FactoryStorageLayoutJSON = "{\"storage\":[{\"astId\":1000,\"contract\":\"src/universal/OptimismMintableERC20Factory.sol:OptimismMintableERC20Factory\",\"label\":\"_initialized\",\"offset\":0,\"slot\":\"0\",\"type\":\"t_uint8\"},{\"astId\":1001,\"contract\":\"src/universal/OptimismMintableERC20Factory.sol:OptimismMintableERC20Factory\",\"label\":\"_initializing\",\"offset\":1,\"slot\":\"0\",\"type\":\"t_bool\"},{\"astId\":1002,\"contract\":\"src/universal/OptimismMintableERC20Factory.sol:OptimismMintableERC20Factory\",\"label\":\"bridge\",\"offset\":2,\"slot\":\"0\",\"type\":\"t_address\"}],\"types\":{\"t_address\":{\"encoding\":\"inplace\",\"label\":\"address\",\"numberOfBytes\":\"20\"},\"t_bool\":{\"encoding\":\"inplace\",\"label\":\"bool\",\"numberOfBytes\":\"1\"},\"t_uint8\":{\"encoding\":\"inplace\",\"label\":\"uint8\",\"numberOfBytes\":\"1\"}}}" var OptimismMintableERC20FactoryStorageLayout = new(solc.StorageLayout) -var OptimismMintableERC20FactoryDeployedBin = "0x60806040523480156200001157600080fd5b5060043610620000525760003560e01c806354fd4d501462000057578063896f93d11462000079578063ce5ac90f14620000b6578063ee9a31a214620000cd575b600080fd5b62000061620000f5565b60405162000070919062000587565b60405180910390f35b620000906200008a36600462000685565b620001a0565b60405173ffffffffffffffffffffffffffffffffffffffff909116815260200162000070565b62000090620000c736600462000685565b620001b7565b620000907f000000000000000000000000000000000000000000000000000000000000000081565b6060620001227f0000000000000000000000000000000000000000000000000000000000000000620003ad565b6200014d7f0000000000000000000000000000000000000000000000000000000000000000620003ad565b620001787f0000000000000000000000000000000000000000000000000000000000000000620003ad565b6040516020016200018c939291906200071c565b604051602081830303815290604052905090565b6000620001af848484620001b7565b949350505050565b600073ffffffffffffffffffffffffffffffffffffffff841662000261576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152603f60248201527f4f7074696d69736d4d696e7461626c654552433230466163746f72793a206d7560448201527f73742070726f766964652072656d6f746520746f6b656e206164647265737300606482015260840160405180910390fd5b60008484846040516020016200027a9392919062000798565b6040516020818303038152906040528051906020012090506000817f0000000000000000000000000000000000000000000000000000000000000000878787604051620002c790620004fa565b620002d69493929190620007e7565b8190604051809103906000f5905080158015620002f7573d6000803e3d6000fd5b5090508073ffffffffffffffffffffffffffffffffffffffff168673ffffffffffffffffffffffffffffffffffffffff167fceeb8e7d520d7f3b65fc11a262b91066940193b05d4f93df07cfdced0eb551cf60405160405180910390a360405133815273ffffffffffffffffffffffffffffffffffffffff80881691908316907f52fe89dd5930f343d25650b62fd367bae47088bcddffd2a88350a6ecdd620cdb9060200160405180910390a395945050505050565b606081600003620003f157505060408051808201909152600181527f3000000000000000000000000000000000000000000000000000000000000000602082015290565b8160005b8115620004215780620004088162000870565b9150620004199050600a83620008da565b9150620003f5565b60008167ffffffffffffffff8111156200043f576200043f620005a3565b6040519080825280601f01601f1916602001820160405280156200046a576020820181803683370190505b5090505b8415620001af5762000482600183620008f1565b915062000491600a866200090b565b6200049e90603062000922565b60f81b818381518110620004b657620004b66200093d565b60200101907effffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916908160001a905350620004f2600a86620008da565b94506200046e565b611a84806200096d83390190565b60005b83811015620005255781810151838201526020016200050b565b8381111562000535576000848401525b50505050565b600081518084526200055581602086016020860162000508565b601f017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0169290920160200192915050565b6020815260006200059c60208301846200053b565b9392505050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b600082601f830112620005e457600080fd5b813567ffffffffffffffff80821115620006025762000602620005a3565b604051601f83017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0908116603f011681019082821181831017156200064b576200064b620005a3565b816040528381528660208588010111156200066557600080fd5b836020870160208301376000602085830101528094505050505092915050565b6000806000606084860312156200069b57600080fd5b833573ffffffffffffffffffffffffffffffffffffffff81168114620006c057600080fd5b9250602084013567ffffffffffffffff80821115620006de57600080fd5b620006ec87838801620005d2565b935060408601359150808211156200070357600080fd5b506200071286828701620005d2565b9150509250925092565b600084516200073081846020890162000508565b80830190507f2e0000000000000000000000000000000000000000000000000000000000000080825285516200076e816001850160208a0162000508565b600192019182015283516200078b81600284016020880162000508565b0160020195945050505050565b73ffffffffffffffffffffffffffffffffffffffff84168152606060208201526000620007c960608301856200053b565b8281036040840152620007dd81856200053b565b9695505050505050565b600073ffffffffffffffffffffffffffffffffffffffff8087168352808616602084015250608060408301526200082260808301856200053b565b82810360608401526200083681856200053b565b979650505050505050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fd5b60007fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff8203620008a457620008a462000841565b5060010190565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601260045260246000fd5b600082620008ec57620008ec620008ab565b500490565b60008282101562000906576200090662000841565b500390565b6000826200091d576200091d620008ab565b500690565b6000821982111562000938576200093862000841565b500190565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fdfe6101206040523480156200001257600080fd5b5060405162001a8438038062001a8483398101604081905262000035916200016d565b6001806000848460036200004a83826200028c565b5060046200005982826200028c565b50505060809290925260a05260c05250506001600160a01b0390811660e052166101005262000358565b80516001600160a01b03811681146200009b57600080fd5b919050565b634e487b7160e01b600052604160045260246000fd5b600082601f830112620000c857600080fd5b81516001600160401b0380821115620000e557620000e5620000a0565b604051601f8301601f19908116603f01168101908282118183101715620001105762000110620000a0565b816040528381526020925086838588010111156200012d57600080fd5b600091505b8382101562000151578582018301518183018401529082019062000132565b83821115620001635760008385830101525b9695505050505050565b600080600080608085870312156200018457600080fd5b6200018f8562000083565b93506200019f6020860162000083565b60408601519093506001600160401b0380821115620001bd57600080fd5b620001cb88838901620000b6565b93506060870151915080821115620001e257600080fd5b50620001f187828801620000b6565b91505092959194509250565b600181811c908216806200021257607f821691505b6020821081036200023357634e487b7160e01b600052602260045260246000fd5b50919050565b601f8211156200028757600081815260208120601f850160051c81016020861015620002625750805b601f850160051c820191505b8181101562000283578281556001016200026e565b5050505b505050565b81516001600160401b03811115620002a857620002a8620000a0565b620002c081620002b98454620001fd565b8462000239565b602080601f831160018114620002f85760008415620002df5750858301515b600019600386901b1c1916600185901b17855562000283565b600085815260208120601f198616915b82811015620003295788860151825594840194600190910190840162000308565b5085821015620003485787850151600019600388901b60f8161c191681555b5050505050600190811b01905550565b60805160a05160c05160e051610100516116cb620003b9600039600081816102f50152818161038a015281816105cf01526107a90152600081816101a9015261031b015260006107380152600061070f015260006106e601526116cb6000f3fe608060405234801561001057600080fd5b50600436106101775760003560e01c806370a08231116100d8578063ae1f6aaf1161008c578063dd62ed3e11610066578063dd62ed3e1461033f578063e78cea92146102f3578063ee9a31a21461038557600080fd5b8063ae1f6aaf146102f3578063c01e1bd614610319578063d6c0b2c41461031957600080fd5b80639dc29fac116100bd5780639dc29fac146102ba578063a457c2d7146102cd578063a9059cbb146102e057600080fd5b806370a082311461027c57806395d89b41146102b257600080fd5b806323b872dd1161012f5780633950935111610114578063395093511461024c57806340c10f191461025f57806354fd4d501461027457600080fd5b806323b872dd1461022a578063313ce5671461023d57600080fd5b806306fdde031161016057806306fdde03146101f0578063095ea7b31461020557806318160ddd1461021857600080fd5b806301ffc9a71461017c578063033964be146101a4575b600080fd5b61018f61018a366004611307565b6103ac565b60405190151581526020015b60405180910390f35b6101cb7f000000000000000000000000000000000000000000000000000000000000000081565b60405173ffffffffffffffffffffffffffffffffffffffff909116815260200161019b565b6101f861049d565b60405161019b919061137c565b61018f6102133660046113f6565b61052f565b6002545b60405190815260200161019b565b61018f610238366004611420565b610547565b6040516012815260200161019b565b61018f61025a3660046113f6565b61056b565b61027261026d3660046113f6565b6105b7565b005b6101f86106df565b61021c61028a36600461145c565b73ffffffffffffffffffffffffffffffffffffffff1660009081526020819052604090205490565b6101f8610782565b6102726102c83660046113f6565b610791565b61018f6102db3660046113f6565b6108a8565b61018f6102ee3660046113f6565b610979565b7f00000000000000000000000000000000000000000000000000000000000000006101cb565b7f00000000000000000000000000000000000000000000000000000000000000006101cb565b61021c61034d366004611477565b73ffffffffffffffffffffffffffffffffffffffff918216600090815260016020908152604080832093909416825291909152205490565b6101cb7f000000000000000000000000000000000000000000000000000000000000000081565b60007f01ffc9a7000000000000000000000000000000000000000000000000000000007f1d1d8b63000000000000000000000000000000000000000000000000000000007fec4fc8e3000000000000000000000000000000000000000000000000000000007fffffffff00000000000000000000000000000000000000000000000000000000851683148061046557507fffffffff00000000000000000000000000000000000000000000000000000000858116908316145b8061049457507fffffffff00000000000000000000000000000000000000000000000000000000858116908216145b95945050505050565b6060600380546104ac906114aa565b80601f01602080910402602001604051908101604052809291908181526020018280546104d8906114aa565b80156105255780601f106104fa57610100808354040283529160200191610525565b820191906000526020600020905b81548152906001019060200180831161050857829003601f168201915b5050505050905090565b60003361053d818585610987565b5060019392505050565b600033610555858285610b3b565b610560858585610c12565b506001949350505050565b33600081815260016020908152604080832073ffffffffffffffffffffffffffffffffffffffff8716845290915281205490919061053d90829086906105b290879061152c565b610987565b3373ffffffffffffffffffffffffffffffffffffffff7f00000000000000000000000000000000000000000000000000000000000000001614610681576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152603460248201527f4f7074696d69736d4d696e7461626c6545524332303a206f6e6c79206272696460448201527f67652063616e206d696e7420616e64206275726e00000000000000000000000060648201526084015b60405180910390fd5b61068b8282610ec5565b8173ffffffffffffffffffffffffffffffffffffffff167f0f6798a560793a54c3bcfe86a93cde1e73087d944c0ea20544137d4121396885826040516106d391815260200190565b60405180910390a25050565b606061070a7f0000000000000000000000000000000000000000000000000000000000000000610fe5565b6107337f0000000000000000000000000000000000000000000000000000000000000000610fe5565b61075c7f0000000000000000000000000000000000000000000000000000000000000000610fe5565b60405160200161076e93929190611544565b604051602081830303815290604052905090565b6060600480546104ac906114aa565b3373ffffffffffffffffffffffffffffffffffffffff7f00000000000000000000000000000000000000000000000000000000000000001614610856576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152603460248201527f4f7074696d69736d4d696e7461626c6545524332303a206f6e6c79206272696460448201527f67652063616e206d696e7420616e64206275726e0000000000000000000000006064820152608401610678565b6108608282611122565b8173ffffffffffffffffffffffffffffffffffffffff167fcc16f5dbb4873280815c1ee09dbd06736cffcc184412cf7a71a0fdb75d397ca5826040516106d391815260200190565b33600081815260016020908152604080832073ffffffffffffffffffffffffffffffffffffffff871684529091528120549091908381101561096c576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602560248201527f45524332303a2064656372656173656420616c6c6f77616e63652062656c6f7760448201527f207a65726f0000000000000000000000000000000000000000000000000000006064820152608401610678565b6105608286868403610987565b60003361053d818585610c12565b73ffffffffffffffffffffffffffffffffffffffff8316610a29576040517f08c379a0000000000000000000000000000000000000000000000000000000008152602060048201526024808201527f45524332303a20617070726f76652066726f6d20746865207a65726f2061646460448201527f72657373000000000000000000000000000000000000000000000000000000006064820152608401610678565b73ffffffffffffffffffffffffffffffffffffffff8216610acc576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602260248201527f45524332303a20617070726f766520746f20746865207a65726f20616464726560448201527f73730000000000000000000000000000000000000000000000000000000000006064820152608401610678565b73ffffffffffffffffffffffffffffffffffffffff83811660008181526001602090815260408083209487168084529482529182902085905590518481527f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b92591015b60405180910390a3505050565b73ffffffffffffffffffffffffffffffffffffffff8381166000908152600160209081526040808320938616835292905220547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff8114610c0c5781811015610bff576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601d60248201527f45524332303a20696e73756666696369656e7420616c6c6f77616e63650000006044820152606401610678565b610c0c8484848403610987565b50505050565b73ffffffffffffffffffffffffffffffffffffffff8316610cb5576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602560248201527f45524332303a207472616e736665722066726f6d20746865207a65726f20616460448201527f64726573730000000000000000000000000000000000000000000000000000006064820152608401610678565b73ffffffffffffffffffffffffffffffffffffffff8216610d58576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602360248201527f45524332303a207472616e7366657220746f20746865207a65726f206164647260448201527f65737300000000000000000000000000000000000000000000000000000000006064820152608401610678565b73ffffffffffffffffffffffffffffffffffffffff831660009081526020819052604090205481811015610e0e576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602660248201527f45524332303a207472616e7366657220616d6f756e742065786365656473206260448201527f616c616e636500000000000000000000000000000000000000000000000000006064820152608401610678565b73ffffffffffffffffffffffffffffffffffffffff808516600090815260208190526040808220858503905591851681529081208054849290610e5290849061152c565b925050819055508273ffffffffffffffffffffffffffffffffffffffff168473ffffffffffffffffffffffffffffffffffffffff167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef84604051610eb891815260200190565b60405180910390a3610c0c565b73ffffffffffffffffffffffffffffffffffffffff8216610f42576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601f60248201527f45524332303a206d696e7420746f20746865207a65726f2061646472657373006044820152606401610678565b8060026000828254610f54919061152c565b909155505073ffffffffffffffffffffffffffffffffffffffff821660009081526020819052604081208054839290610f8e90849061152c565b909155505060405181815273ffffffffffffffffffffffffffffffffffffffff8316906000907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef9060200160405180910390a35050565b60608160000361102857505060408051808201909152600181527f3000000000000000000000000000000000000000000000000000000000000000602082015290565b8160005b8115611052578061103c816115ba565b915061104b9050600a83611621565b915061102c565b60008167ffffffffffffffff81111561106d5761106d611635565b6040519080825280601f01601f191660200182016040528015611097576020820181803683370190505b5090505b841561111a576110ac600183611664565b91506110b9600a8661167b565b6110c490603061152c565b60f81b8183815181106110d9576110d961168f565b60200101907effffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916908160001a905350611113600a86611621565b945061109b565b949350505050565b73ffffffffffffffffffffffffffffffffffffffff82166111c5576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602160248201527f45524332303a206275726e2066726f6d20746865207a65726f2061646472657360448201527f73000000000000000000000000000000000000000000000000000000000000006064820152608401610678565b73ffffffffffffffffffffffffffffffffffffffff82166000908152602081905260409020548181101561127b576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602260248201527f45524332303a206275726e20616d6f756e7420657863656564732062616c616e60448201527f63650000000000000000000000000000000000000000000000000000000000006064820152608401610678565b73ffffffffffffffffffffffffffffffffffffffff831660009081526020819052604081208383039055600280548492906112b7908490611664565b909155505060405182815260009073ffffffffffffffffffffffffffffffffffffffff8516907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef90602001610b2e565b60006020828403121561131957600080fd5b81357fffffffff000000000000000000000000000000000000000000000000000000008116811461134957600080fd5b9392505050565b60005b8381101561136b578181015183820152602001611353565b83811115610c0c5750506000910152565b602081526000825180602084015261139b816040850160208701611350565b601f017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0169190910160400192915050565b803573ffffffffffffffffffffffffffffffffffffffff811681146113f157600080fd5b919050565b6000806040838503121561140957600080fd5b611412836113cd565b946020939093013593505050565b60008060006060848603121561143557600080fd5b61143e846113cd565b925061144c602085016113cd565b9150604084013590509250925092565b60006020828403121561146e57600080fd5b611349826113cd565b6000806040838503121561148a57600080fd5b611493836113cd565b91506114a1602084016113cd565b90509250929050565b600181811c908216806114be57607f821691505b6020821081036114f7577f4e487b7100000000000000000000000000000000000000000000000000000000600052602260045260246000fd5b50919050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fd5b6000821982111561153f5761153f6114fd565b500190565b60008451611556818460208901611350565b80830190507f2e000000000000000000000000000000000000000000000000000000000000008082528551611592816001850160208a01611350565b600192019182015283516115ad816002840160208801611350565b0160020195945050505050565b60007fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff82036115eb576115eb6114fd565b5060010190565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601260045260246000fd5b600082611630576116306115f2565b500490565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b600082821015611676576116766114fd565b500390565b60008261168a5761168a6115f2565b500690565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fdfea164736f6c634300080f000aa164736f6c634300080f000a" +var OptimismMintableERC20FactoryDeployedBin = "0x60806040523480156200001157600080fd5b50600436106200007b5760003560e01c8063ce5ac90f1162000056578063ce5ac90f14620000f8578063e78cea92146200010f578063ee9a31a2146200013657600080fd5b806354fd4d501462000080578063896f93d114620000a2578063c4d66de814620000df575b600080fd5b6200008a6200015b565b6040516200009991906200076e565b60405180910390f35b620000b9620000b336600462000896565b62000206565b60405173ffffffffffffffffffffffffffffffffffffffff909116815260200162000099565b620000f6620000f036600462000913565b6200021d565b005b620000b96200010936600462000896565b6200039f565b600054620000b99062010000900473ffffffffffffffffffffffffffffffffffffffff1681565b60005462010000900473ffffffffffffffffffffffffffffffffffffffff16620000b9565b6060620001887f000000000000000000000000000000000000000000000000000000000000000062000594565b620001b37f000000000000000000000000000000000000000000000000000000000000000062000594565b620001de7f000000000000000000000000000000000000000000000000000000000000000062000594565b604051602001620001f29392919062000931565b604051602081830303815290604052905090565b6000620002158484846200039f565b949350505050565b600054600290610100900460ff1615801562000240575060005460ff8083169116105b620002d2576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602e60248201527f496e697469616c697a61626c653a20636f6e747261637420697320616c72656160448201527f647920696e697469616c697a656400000000000000000000000000000000000060648201526084015b60405180910390fd5b6000805461010060ff84167fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff00009092168217177fffffffffffffffffffff000000000000000000000000000000000000000000ff167fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff00ff6201000073ffffffffffffffffffffffffffffffffffffffff87160216179091556040519081527f7f26b83ff96e1f2b6a682f133852f6798a09c465da95921460cefb38474024989060200160405180910390a15050565b600073ffffffffffffffffffffffffffffffffffffffff841662000446576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152603f60248201527f4f7074696d69736d4d696e7461626c654552433230466163746f72793a206d7560448201527f73742070726f766964652072656d6f746520746f6b656e2061646472657373006064820152608401620002c9565b60008484846040516020016200045f93929190620009ad565b604051602081830303815290604052805190602001209050600081600060029054906101000a900473ffffffffffffffffffffffffffffffffffffffff16878787604051620004ae90620006e1565b620004bd9493929190620009fc565b8190604051809103906000f5905080158015620004de573d6000803e3d6000fd5b5090508073ffffffffffffffffffffffffffffffffffffffff168673ffffffffffffffffffffffffffffffffffffffff167fceeb8e7d520d7f3b65fc11a262b91066940193b05d4f93df07cfdced0eb551cf60405160405180910390a360405133815273ffffffffffffffffffffffffffffffffffffffff80881691908316907f52fe89dd5930f343d25650b62fd367bae47088bcddffd2a88350a6ecdd620cdb9060200160405180910390a395945050505050565b606081600003620005d857505060408051808201909152600181527f3000000000000000000000000000000000000000000000000000000000000000602082015290565b8160005b8115620006085780620005ef8162000a85565b9150620006009050600a8362000aef565b9150620005dc565b60008167ffffffffffffffff811115620006265762000626620007b4565b6040519080825280601f01601f19166020018201604052801562000651576020820181803683370190505b5090505b841562000215576200066960018362000b06565b915062000678600a8662000b20565b6200068590603062000b37565b60f81b8183815181106200069d576200069d62000b52565b60200101907effffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916908160001a905350620006d9600a8662000aef565b945062000655565b611a848062000b8283390190565b60005b838110156200070c578181015183820152602001620006f2565b838111156200071c576000848401525b50505050565b600081518084526200073c816020860160208601620006ef565b601f017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0169290920160200192915050565b60208152600062000783602083018462000722565b9392505050565b803573ffffffffffffffffffffffffffffffffffffffff81168114620007af57600080fd5b919050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b600082601f830112620007f557600080fd5b813567ffffffffffffffff80821115620008135762000813620007b4565b604051601f83017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0908116603f011681019082821181831017156200085c576200085c620007b4565b816040528381528660208588010111156200087657600080fd5b836020870160208301376000602085830101528094505050505092915050565b600080600060608486031215620008ac57600080fd5b620008b7846200078a565b9250602084013567ffffffffffffffff80821115620008d557600080fd5b620008e387838801620007e3565b93506040860135915080821115620008fa57600080fd5b506200090986828701620007e3565b9150509250925092565b6000602082840312156200092657600080fd5b62000783826200078a565b6000845162000945818460208901620006ef565b80830190507f2e00000000000000000000000000000000000000000000000000000000000000808252855162000983816001850160208a01620006ef565b60019201918201528351620009a0816002840160208801620006ef565b0160020195945050505050565b73ffffffffffffffffffffffffffffffffffffffff84168152606060208201526000620009de606083018562000722565b8281036040840152620009f2818562000722565b9695505050505050565b600073ffffffffffffffffffffffffffffffffffffffff80871683528086166020840152506080604083015262000a37608083018562000722565b828103606084015262000a4b818562000722565b979650505050505050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fd5b60007fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff820362000ab95762000ab962000a56565b5060010190565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601260045260246000fd5b60008262000b015762000b0162000ac0565b500490565b60008282101562000b1b5762000b1b62000a56565b500390565b60008262000b325762000b3262000ac0565b500690565b6000821982111562000b4d5762000b4d62000a56565b500190565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fdfe6101206040523480156200001257600080fd5b5060405162001a8438038062001a8483398101604081905262000035916200016d565b6001806000848460036200004a83826200028c565b5060046200005982826200028c565b50505060809290925260a05260c05250506001600160a01b0390811660e052166101005262000358565b80516001600160a01b03811681146200009b57600080fd5b919050565b634e487b7160e01b600052604160045260246000fd5b600082601f830112620000c857600080fd5b81516001600160401b0380821115620000e557620000e5620000a0565b604051601f8301601f19908116603f01168101908282118183101715620001105762000110620000a0565b816040528381526020925086838588010111156200012d57600080fd5b600091505b8382101562000151578582018301518183018401529082019062000132565b83821115620001635760008385830101525b9695505050505050565b600080600080608085870312156200018457600080fd5b6200018f8562000083565b93506200019f6020860162000083565b60408601519093506001600160401b0380821115620001bd57600080fd5b620001cb88838901620000b6565b93506060870151915080821115620001e257600080fd5b50620001f187828801620000b6565b91505092959194509250565b600181811c908216806200021257607f821691505b6020821081036200023357634e487b7160e01b600052602260045260246000fd5b50919050565b601f8211156200028757600081815260208120601f850160051c81016020861015620002625750805b601f850160051c820191505b8181101562000283578281556001016200026e565b5050505b505050565b81516001600160401b03811115620002a857620002a8620000a0565b620002c081620002b98454620001fd565b8462000239565b602080601f831160018114620002f85760008415620002df5750858301515b600019600386901b1c1916600185901b17855562000283565b600085815260208120601f198616915b82811015620003295788860151825594840194600190910190840162000308565b5085821015620003485787850151600019600388901b60f8161c191681555b5050505050600190811b01905550565b60805160a05160c05160e051610100516116cb620003b9600039600081816102f50152818161038a015281816105cf01526107a90152600081816101a9015261031b015260006107380152600061070f015260006106e601526116cb6000f3fe608060405234801561001057600080fd5b50600436106101775760003560e01c806370a08231116100d8578063ae1f6aaf1161008c578063dd62ed3e11610066578063dd62ed3e1461033f578063e78cea92146102f3578063ee9a31a21461038557600080fd5b8063ae1f6aaf146102f3578063c01e1bd614610319578063d6c0b2c41461031957600080fd5b80639dc29fac116100bd5780639dc29fac146102ba578063a457c2d7146102cd578063a9059cbb146102e057600080fd5b806370a082311461027c57806395d89b41146102b257600080fd5b806323b872dd1161012f5780633950935111610114578063395093511461024c57806340c10f191461025f57806354fd4d501461027457600080fd5b806323b872dd1461022a578063313ce5671461023d57600080fd5b806306fdde031161016057806306fdde03146101f0578063095ea7b31461020557806318160ddd1461021857600080fd5b806301ffc9a71461017c578063033964be146101a4575b600080fd5b61018f61018a366004611307565b6103ac565b60405190151581526020015b60405180910390f35b6101cb7f000000000000000000000000000000000000000000000000000000000000000081565b60405173ffffffffffffffffffffffffffffffffffffffff909116815260200161019b565b6101f861049d565b60405161019b919061137c565b61018f6102133660046113f6565b61052f565b6002545b60405190815260200161019b565b61018f610238366004611420565b610547565b6040516012815260200161019b565b61018f61025a3660046113f6565b61056b565b61027261026d3660046113f6565b6105b7565b005b6101f86106df565b61021c61028a36600461145c565b73ffffffffffffffffffffffffffffffffffffffff1660009081526020819052604090205490565b6101f8610782565b6102726102c83660046113f6565b610791565b61018f6102db3660046113f6565b6108a8565b61018f6102ee3660046113f6565b610979565b7f00000000000000000000000000000000000000000000000000000000000000006101cb565b7f00000000000000000000000000000000000000000000000000000000000000006101cb565b61021c61034d366004611477565b73ffffffffffffffffffffffffffffffffffffffff918216600090815260016020908152604080832093909416825291909152205490565b6101cb7f000000000000000000000000000000000000000000000000000000000000000081565b60007f01ffc9a7000000000000000000000000000000000000000000000000000000007f1d1d8b63000000000000000000000000000000000000000000000000000000007fec4fc8e3000000000000000000000000000000000000000000000000000000007fffffffff00000000000000000000000000000000000000000000000000000000851683148061046557507fffffffff00000000000000000000000000000000000000000000000000000000858116908316145b8061049457507fffffffff00000000000000000000000000000000000000000000000000000000858116908216145b95945050505050565b6060600380546104ac906114aa565b80601f01602080910402602001604051908101604052809291908181526020018280546104d8906114aa565b80156105255780601f106104fa57610100808354040283529160200191610525565b820191906000526020600020905b81548152906001019060200180831161050857829003601f168201915b5050505050905090565b60003361053d818585610987565b5060019392505050565b600033610555858285610b3b565b610560858585610c12565b506001949350505050565b33600081815260016020908152604080832073ffffffffffffffffffffffffffffffffffffffff8716845290915281205490919061053d90829086906105b290879061152c565b610987565b3373ffffffffffffffffffffffffffffffffffffffff7f00000000000000000000000000000000000000000000000000000000000000001614610681576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152603460248201527f4f7074696d69736d4d696e7461626c6545524332303a206f6e6c79206272696460448201527f67652063616e206d696e7420616e64206275726e00000000000000000000000060648201526084015b60405180910390fd5b61068b8282610ec5565b8173ffffffffffffffffffffffffffffffffffffffff167f0f6798a560793a54c3bcfe86a93cde1e73087d944c0ea20544137d4121396885826040516106d391815260200190565b60405180910390a25050565b606061070a7f0000000000000000000000000000000000000000000000000000000000000000610fe5565b6107337f0000000000000000000000000000000000000000000000000000000000000000610fe5565b61075c7f0000000000000000000000000000000000000000000000000000000000000000610fe5565b60405160200161076e93929190611544565b604051602081830303815290604052905090565b6060600480546104ac906114aa565b3373ffffffffffffffffffffffffffffffffffffffff7f00000000000000000000000000000000000000000000000000000000000000001614610856576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152603460248201527f4f7074696d69736d4d696e7461626c6545524332303a206f6e6c79206272696460448201527f67652063616e206d696e7420616e64206275726e0000000000000000000000006064820152608401610678565b6108608282611122565b8173ffffffffffffffffffffffffffffffffffffffff167fcc16f5dbb4873280815c1ee09dbd06736cffcc184412cf7a71a0fdb75d397ca5826040516106d391815260200190565b33600081815260016020908152604080832073ffffffffffffffffffffffffffffffffffffffff871684529091528120549091908381101561096c576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602560248201527f45524332303a2064656372656173656420616c6c6f77616e63652062656c6f7760448201527f207a65726f0000000000000000000000000000000000000000000000000000006064820152608401610678565b6105608286868403610987565b60003361053d818585610c12565b73ffffffffffffffffffffffffffffffffffffffff8316610a29576040517f08c379a0000000000000000000000000000000000000000000000000000000008152602060048201526024808201527f45524332303a20617070726f76652066726f6d20746865207a65726f2061646460448201527f72657373000000000000000000000000000000000000000000000000000000006064820152608401610678565b73ffffffffffffffffffffffffffffffffffffffff8216610acc576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602260248201527f45524332303a20617070726f766520746f20746865207a65726f20616464726560448201527f73730000000000000000000000000000000000000000000000000000000000006064820152608401610678565b73ffffffffffffffffffffffffffffffffffffffff83811660008181526001602090815260408083209487168084529482529182902085905590518481527f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b92591015b60405180910390a3505050565b73ffffffffffffffffffffffffffffffffffffffff8381166000908152600160209081526040808320938616835292905220547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff8114610c0c5781811015610bff576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601d60248201527f45524332303a20696e73756666696369656e7420616c6c6f77616e63650000006044820152606401610678565b610c0c8484848403610987565b50505050565b73ffffffffffffffffffffffffffffffffffffffff8316610cb5576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602560248201527f45524332303a207472616e736665722066726f6d20746865207a65726f20616460448201527f64726573730000000000000000000000000000000000000000000000000000006064820152608401610678565b73ffffffffffffffffffffffffffffffffffffffff8216610d58576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602360248201527f45524332303a207472616e7366657220746f20746865207a65726f206164647260448201527f65737300000000000000000000000000000000000000000000000000000000006064820152608401610678565b73ffffffffffffffffffffffffffffffffffffffff831660009081526020819052604090205481811015610e0e576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602660248201527f45524332303a207472616e7366657220616d6f756e742065786365656473206260448201527f616c616e636500000000000000000000000000000000000000000000000000006064820152608401610678565b73ffffffffffffffffffffffffffffffffffffffff808516600090815260208190526040808220858503905591851681529081208054849290610e5290849061152c565b925050819055508273ffffffffffffffffffffffffffffffffffffffff168473ffffffffffffffffffffffffffffffffffffffff167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef84604051610eb891815260200190565b60405180910390a3610c0c565b73ffffffffffffffffffffffffffffffffffffffff8216610f42576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601f60248201527f45524332303a206d696e7420746f20746865207a65726f2061646472657373006044820152606401610678565b8060026000828254610f54919061152c565b909155505073ffffffffffffffffffffffffffffffffffffffff821660009081526020819052604081208054839290610f8e90849061152c565b909155505060405181815273ffffffffffffffffffffffffffffffffffffffff8316906000907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef9060200160405180910390a35050565b60608160000361102857505060408051808201909152600181527f3000000000000000000000000000000000000000000000000000000000000000602082015290565b8160005b8115611052578061103c816115ba565b915061104b9050600a83611621565b915061102c565b60008167ffffffffffffffff81111561106d5761106d611635565b6040519080825280601f01601f191660200182016040528015611097576020820181803683370190505b5090505b841561111a576110ac600183611664565b91506110b9600a8661167b565b6110c490603061152c565b60f81b8183815181106110d9576110d961168f565b60200101907effffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916908160001a905350611113600a86611621565b945061109b565b949350505050565b73ffffffffffffffffffffffffffffffffffffffff82166111c5576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602160248201527f45524332303a206275726e2066726f6d20746865207a65726f2061646472657360448201527f73000000000000000000000000000000000000000000000000000000000000006064820152608401610678565b73ffffffffffffffffffffffffffffffffffffffff82166000908152602081905260409020548181101561127b576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602260248201527f45524332303a206275726e20616d6f756e7420657863656564732062616c616e60448201527f63650000000000000000000000000000000000000000000000000000000000006064820152608401610678565b73ffffffffffffffffffffffffffffffffffffffff831660009081526020819052604081208383039055600280548492906112b7908490611664565b909155505060405182815260009073ffffffffffffffffffffffffffffffffffffffff8516907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef90602001610b2e565b60006020828403121561131957600080fd5b81357fffffffff000000000000000000000000000000000000000000000000000000008116811461134957600080fd5b9392505050565b60005b8381101561136b578181015183820152602001611353565b83811115610c0c5750506000910152565b602081526000825180602084015261139b816040850160208701611350565b601f017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0169190910160400192915050565b803573ffffffffffffffffffffffffffffffffffffffff811681146113f157600080fd5b919050565b6000806040838503121561140957600080fd5b611412836113cd565b946020939093013593505050565b60008060006060848603121561143557600080fd5b61143e846113cd565b925061144c602085016113cd565b9150604084013590509250925092565b60006020828403121561146e57600080fd5b611349826113cd565b6000806040838503121561148a57600080fd5b611493836113cd565b91506114a1602084016113cd565b90509250929050565b600181811c908216806114be57607f821691505b6020821081036114f7577f4e487b7100000000000000000000000000000000000000000000000000000000600052602260045260246000fd5b50919050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fd5b6000821982111561153f5761153f6114fd565b500190565b60008451611556818460208901611350565b80830190507f2e000000000000000000000000000000000000000000000000000000000000008082528551611592816001850160208a01611350565b600192019182015283516115ad816002840160208801611350565b0160020195945050505050565b60007fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff82036115eb576115eb6114fd565b5060010190565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601260045260246000fd5b600082611630576116306115f2565b500490565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b600082821015611676576116766114fd565b500390565b60008261168a5761168a6115f2565b500690565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fdfea164736f6c634300080f000aa164736f6c634300080f000a" func init() { if err := json.Unmarshal([]byte(OptimismMintableERC20FactoryStorageLayoutJSON), OptimismMintableERC20FactoryStorageLayout); err != nil { From b6ec01918b5a9b51463f2aee62e99da534cdb980 Mon Sep 17 00:00:00 2001 From: Mark Tyneway Date: Wed, 16 Aug 2023 15:31:34 -0700 Subject: [PATCH 2/7] op-chain-ops: update for new bindings --- op-chain-ops/genesis/config.go | 5 +++++ op-chain-ops/immutables/immutables.go | 2 +- 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/op-chain-ops/genesis/config.go b/op-chain-ops/genesis/config.go index fee29bd9780e..5f38b28b199e 100644 --- a/op-chain-ops/genesis/config.go +++ b/op-chain-ops/genesis/config.go @@ -695,6 +695,11 @@ func NewL2StorageConfig(config *DeployConfig, block *types.Block) (state.Storage "_initialized": 2, "_initializing": false, } + storage["OptimismMintableERC20Factory"] = state.StorageValues{ + "bridge": predeploys.L2StandardBridgeAddr, + "_initialized": 2, + "_initializing": false, + } return storage, nil } diff --git a/op-chain-ops/immutables/immutables.go b/op-chain-ops/immutables/immutables.go index fee6fce3b739..c72afb8babce 100644 --- a/op-chain-ops/immutables/immutables.go +++ b/op-chain-ops/immutables/immutables.go @@ -216,7 +216,7 @@ func l2Deployer(backend *backends.SimulatedBackend, opts *bind.TransactOpts, dep } _, tx, _, err = bindings.DeployL1FeeVault(opts, backend, recipient, minimumWithdrawalAmount, withdrawalNetwork) case "OptimismMintableERC20Factory": - _, tx, _, err = bindings.DeployOptimismMintableERC20Factory(opts, backend, predeploys.L2StandardBridgeAddr) + _, tx, _, err = bindings.DeployOptimismMintableERC20Factory(opts, backend) case "DeployerWhitelist": _, tx, _, err = bindings.DeployDeployerWhitelist(opts, backend) case "LegacyMessagePasser": From 57f544f9de90de80508d2fe8d1d6c303c1a33b34 Mon Sep 17 00:00:00 2001 From: Mark Tyneway Date: Wed, 16 Aug 2023 15:36:14 -0700 Subject: [PATCH 3/7] erc20 factory: update implementation --- packages/contracts-bedrock/.gas-snapshot | 36 +++++++++---------- packages/contracts-bedrock/.storage-layout | 17 --------- .../contracts-bedrock/scripts/Deploy.s.sol | 12 ++++--- packages/contracts-bedrock/semver-lock.json | 2 +- .../OptimismMintableERC20Factory.sol | 26 ++++++++++---- .../contracts-bedrock/test/CommonTest.t.sol | 22 +++++++++--- 6 files changed, 63 insertions(+), 52 deletions(-) diff --git a/packages/contracts-bedrock/.gas-snapshot b/packages/contracts-bedrock/.gas-snapshot index e85964bc5bf3..33e3b2028737 100644 --- a/packages/contracts-bedrock/.gas-snapshot +++ b/packages/contracts-bedrock/.gas-snapshot @@ -17,7 +17,7 @@ AttestationStationTest:test_attest_bulk_succeeds() (gas: 703749) AttestationStationTest:test_attest_individual_succeeds() (gas: 632087) AttestationStationTest:test_attest_single_succeeds() (gas: 651325) BlockOracle_Test:test_checkpointAndLoad_succeeds() (gas: 58341) -BlockOracle_Test:test_load_noBlockHash_reverts() (gas: 12805) +BlockOracle_Test:test_load_noBlockHash_reverts() (gas: 13659) Bytes_slice_Test:test_slice_acrossMultipleWords_works() (gas: 9413) Bytes_slice_Test:test_slice_acrossWords_works() (gas: 1430) Bytes_slice_Test:test_slice_fromNonZeroIdx_works() (gas: 17240) @@ -173,7 +173,7 @@ L1CrossDomainMessenger_Test:test_relayMessage_v2_reverts() (gas: 12343) L1CrossDomainMessenger_Test:test_replayMessage_withValue_reverts() (gas: 33166) L1CrossDomainMessenger_Test:test_sendMessage_succeeds() (gas: 392870) L1CrossDomainMessenger_Test:test_sendMessage_twice_succeeds() (gas: 1669046) -L1CrossDomainMessenger_Test:test_xDomainMessageSender_reset_succeeds() (gas: 87043) +L1CrossDomainMessenger_Test:test_xDomainMessageSender_reset_succeeds() (gas: 87904) L1CrossDomainMessenger_Test:test_xDomainSender_notSet_reverts() (gas: 24253) L1ERC721Bridge_Test:test_bridgeERC721To_localTokenZeroAddress_reverts() (gas: 62677) L1ERC721Bridge_Test:test_bridgeERC721To_remoteTokenZeroAddress_reverts() (gas: 37273) @@ -217,7 +217,7 @@ L2CrossDomainMessenger_Test:test_relayMessage_toSystemContract_reverts() (gas: 3 L2CrossDomainMessenger_Test:test_relayMessage_v2_reverts() (gas: 11689) L2CrossDomainMessenger_Test:test_sendMessage_succeeds() (gas: 123768) L2CrossDomainMessenger_Test:test_sendMessage_twice_succeeds() (gas: 135434) -L2CrossDomainMessenger_Test:test_xDomainMessageSender_reset_succeeds() (gas: 48422) +L2CrossDomainMessenger_Test:test_xDomainMessageSender_reset_succeeds() (gas: 49281) L2CrossDomainMessenger_Test:test_xDomainSender_senderNotSet_reverts() (gas: 10590) L2ERC721Bridge_Test:test_bridgeERC721To_localTokenZeroAddress_reverts() (gas: 31428) L2ERC721Bridge_Test:test_bridgeERC721To_remoteTokenZeroAddress_reverts() (gas: 26826) @@ -250,12 +250,12 @@ L2OutputOracle_deleteOutputs_Test:test_deleteL2Outputs_ifNotChallenger_reverts() L2OutputOracle_deleteOutputs_Test:test_deleteL2Outputs_nonExistent_reverts() (gas: 111651) L2OutputOracle_deleteOutputs_Test:test_deleteOutputs_multipleOutputs_succeeds() (gas: 307411) L2OutputOracle_deleteOutputs_Test:test_deleteOutputs_singleOutput_succeeds() (gas: 185564) -L2OutputOracle_getter_Test:test_computeL2Timestamp_succeeds() (gas: 37341) +L2OutputOracle_getter_Test:test_computeL2Timestamp_succeeds() (gas: 38198) L2OutputOracle_getter_Test:test_getL2OutputIndexAfter_multipleOutputsExist_succeeds() (gas: 269700) L2OutputOracle_getter_Test:test_getL2OutputIndexAfter_noOutputsExis_reverts() (gas: 17892) L2OutputOracle_getter_Test:test_getL2OutputIndexAfter_previousBlock_succeeds() (gas: 98188) L2OutputOracle_getter_Test:test_getL2OutputIndexAfter_sameBlock_succeeds() (gas: 98096) -L2OutputOracle_getter_Test:test_getL2Output_succeeds() (gas: 103735) +L2OutputOracle_getter_Test:test_getL2Output_succeeds() (gas: 104600) L2OutputOracle_getter_Test:test_latestBlockNumber_succeeds() (gas: 99129) L2OutputOracle_getter_Test:test_nextBlockNumber_succeeds() (gas: 17447) L2OutputOracle_proposeL2Output_Test:test_proposeL2Output_emptyOutput_reverts() (gas: 28812) @@ -423,10 +423,10 @@ OptimismMintableERC721_Test:test_safeMint_notBridge_reverts() (gas: 11121) OptimismMintableERC721_Test:test_safeMint_succeeds() (gas: 140547) OptimismMintableERC721_Test:test_supportsInterfaces_succeeds() (gas: 9005) OptimismMintableERC721_Test:test_tokenURI_succeeds() (gas: 163441) -OptimismMintableTokenFactory_Test:test_bridge_succeeds() (gas: 7646) -OptimismMintableTokenFactory_Test:test_createStandardL2Token_remoteIsZero_reverts() (gas: 9401) -OptimismMintableTokenFactory_Test:test_createStandardL2Token_sameTwice_reverts() (gas: 8937393460516769032) -OptimismMintableTokenFactory_Test:test_createStandardL2Token_succeeds() (gas: 1293594) +OptimismMintableTokenFactory_Test:test_bridge_succeeds() (gas: 9760) +OptimismMintableTokenFactory_Test:test_createStandardL2Token_remoteIsZero_reverts() (gas: 9471) +OptimismMintableTokenFactory_Test:test_createStandardL2Token_sameTwice_reverts() (gas: 8937393460516769105) +OptimismMintableTokenFactory_Test:test_createStandardL2Token_succeeds() (gas: 1295838) OptimismPortalUpgradeable_Test:test_initialize_cannotInitImpl_reverts() (gas: 11178) OptimismPortalUpgradeable_Test:test_initialize_cannotInitProxy_reverts() (gas: 16111) OptimismPortalUpgradeable_Test:test_params_initValuesOnProxy_succeeds() (gas: 26781) @@ -463,7 +463,7 @@ OptimismPortal_Test:test_depositTransaction_withEthValueAndContractContractCreat OptimismPortal_Test:test_depositTransaction_withEthValueAndEOAContractCreation_succeeds() (gas: 75929) OptimismPortal_Test:test_depositTransaction_withEthValueFromContract_succeeds() (gas: 83476) OptimismPortal_Test:test_depositTransaction_withEthValueFromEOA_succeeds() (gas: 84069) -OptimismPortal_Test:test_isOutputFinalized_succeeds() (gas: 126749) +OptimismPortal_Test:test_isOutputFinalized_succeeds() (gas: 127617) OptimismPortal_Test:test_minimumGasLimit_succeeds() (gas: 17430) OptimismPortal_Test:test_pause_onlyGuardian_reverts() (gas: 24487) OptimismPortal_Test:test_pause_succeeds() (gas: 27344) @@ -523,7 +523,7 @@ PreimageOracle_Test:test_loadKeccak256PreimagePart_outOfBoundsOffset_reverts() ( PreimageOracle_Test:test_loadKeccak256PreimagePart_succeeds() (gas: 76098) PreimageOracle_Test:test_loadLocalData_onePart_succeeds() (gas: 75840) PreimageOracle_Test:test_loadLocalData_outOfBoundsOffset_reverts() (gas: 8803) -ProxyAdmin_Test:test_chugsplashChangeProxyAdmin_succeeds() (gas: 35586) +ProxyAdmin_Test:test_chugsplashChangeProxyAdmin_succeeds() (gas: 36440) ProxyAdmin_Test:test_chugsplashGetProxyAdmin_succeeds() (gas: 15675) ProxyAdmin_Test:test_chugsplashGetProxyImplementation_succeeds() (gas: 51084) ProxyAdmin_Test:test_chugsplashUpgradeAndCall_succeeds() (gas: 82311) @@ -533,7 +533,7 @@ ProxyAdmin_Test:test_delegateResolvedGetProxyAdmin_succeeds() (gas: 17691) ProxyAdmin_Test:test_delegateResolvedGetProxyImplementation_succeeds() (gas: 62028) ProxyAdmin_Test:test_delegateResolvedUpgradeAndCall_succeeds() (gas: 98039) ProxyAdmin_Test:test_delegateResolvedUpgrade_succeeds() (gas: 58482) -ProxyAdmin_Test:test_erc1967ChangeProxyAdmin_succeeds() (gas: 33812) +ProxyAdmin_Test:test_erc1967ChangeProxyAdmin_succeeds() (gas: 34666) ProxyAdmin_Test:test_erc1967GetProxyAdmin_succeeds() (gas: 15616) ProxyAdmin_Test:test_erc1967GetProxyImplementation_succeeds() (gas: 52071) ProxyAdmin_Test:test_erc1967UpgradeAndCall_succeeds() (gas: 78969) @@ -551,9 +551,9 @@ Proxy_Test:test_implementationKey_succeeds() (gas: 20909) Proxy_Test:test_implementation_isZeroAddress_reverts() (gas: 47626) Proxy_Test:test_implementation_zeroAddressCaller_succeeds() (gas: 14752) Proxy_Test:test_ownerKey_succeeds() (gas: 19059) -Proxy_Test:test_ownerProxyCall_notAdmin_succeeds() (gas: 34615) +Proxy_Test:test_ownerProxyCall_notAdmin_succeeds() (gas: 35469) Proxy_Test:test_proxyCallToImp_notAdmin_succeeds() (gas: 30008) -Proxy_Test:test_upgradeToAndCall_functionDoesNotExist_reverts() (gas: 104565) +Proxy_Test:test_upgradeToAndCall_functionDoesNotExist_reverts() (gas: 107978) Proxy_Test:test_upgradeToAndCall_isPayable_succeeds() (gas: 53742) Proxy_Test:test_upgradeToAndCall_succeeds() (gas: 125190) Proxy_Test:test_upgradeTo_clashingFunctionSignatures_succeeds() (gas: 101359) @@ -646,8 +646,8 @@ StandardBridge_Stateless_Test:test_isOptimismMintableERC20_succeeds() (gas: 3307 SystemConfig_Initialize_Test:test_initialize_events_succeeds() (gas: 72059) SystemConfig_Initialize_Test:test_initialize_startBlockOverride_succeeds() (gas: 65240) SystemConfig_Initialize_Test:test_initialize_values_succeeds() (gas: 64946) -SystemConfig_Initialize_TestFail:test_initialize_lowGasLimit_reverts() (gas: 55653) -SystemConfig_Initialize_TestFail:test_initialize_startBlock_reverts() (gas: 78350) +SystemConfig_Initialize_TestFail:test_initialize_lowGasLimit_reverts() (gas: 57241) +SystemConfig_Initialize_TestFail:test_initialize_startBlock_reverts() (gas: 79936) SystemConfig_Setters_TestFail:test_setBatcherHash_notOwner_reverts() (gas: 15607) SystemConfig_Setters_TestFail:test_setGasConfig_notOwner_reverts() (gas: 15577) SystemConfig_Setters_TestFail:test_setGasLimit_notOwner_reverts() (gas: 15676) @@ -658,9 +658,9 @@ SystemConfig_Setters_TestFail:test_setResourceConfig_notOwner_reverts() (gas: 16 SystemConfig_Setters_TestFail:test_setResourceConfig_zeroDenominator_reverts() (gas: 18578) SystemConfig_Setters_TestFail:test_setUnsafeBlockSigner_notOwner_reverts() (gas: 15590) TransactorTest:test_call_succeeds() (gas: 26709) -TransactorTest:test_call_unauthorized_reverts() (gas: 16543) +TransactorTest:test_call_unauthorized_reverts() (gas: 18117) TransactorTest:test_constructor_succeeds() (gas: 9739) TransactorTest:test_delegateCall_succeeds() (gas: 20909) -TransactorTest:test_delegateCall_unauthorized_reverts() (gas: 16550) +TransactorTest:test_delegateCall_unauthorized_reverts() (gas: 18124) TransferOnionTest:test_constructor_succeeds() (gas: 564855) TransferOnionTest:test_unwrap_succeeds() (gas: 724955) \ No newline at end of file diff --git a/packages/contracts-bedrock/.storage-layout b/packages/contracts-bedrock/.storage-layout index dc766e6da467..5a2e3ade5dfa 100644 --- a/packages/contracts-bedrock/.storage-layout +++ b/packages/contracts-bedrock/.storage-layout @@ -259,20 +259,3 @@ ➡ src/universal/OptimismMintableERC20Factory.sol:OptimismMintableERC20Factory ======================= -| Name | Type | Slot | Offset | Bytes | Contract | -|------|------|------|--------|-------|----------| - -======================= -➡ src/dispute/DisputeGameFactory.sol:DisputeGameFactory -======================= - -| Name | Type | Slot | Offset | Bytes | Contract | -|------------------|--------------------------------------------|------|--------|-------|-------------------------------------------------------| -| _initialized | uint8 | 0 | 0 | 1 | src/dispute/DisputeGameFactory.sol:DisputeGameFactory | -| _initializing | bool | 0 | 1 | 1 | src/dispute/DisputeGameFactory.sol:DisputeGameFactory | -| __gap | uint256[50] | 1 | 0 | 1600 | src/dispute/DisputeGameFactory.sol:DisputeGameFactory | -| _owner | address | 51 | 0 | 20 | src/dispute/DisputeGameFactory.sol:DisputeGameFactory | -| __gap | uint256[49] | 52 | 0 | 1568 | src/dispute/DisputeGameFactory.sol:DisputeGameFactory | -| gameImpls | mapping(GameType => contract IDisputeGame) | 101 | 0 | 32 | src/dispute/DisputeGameFactory.sol:DisputeGameFactory | -| _disputeGames | mapping(Hash => GameId) | 102 | 0 | 32 | src/dispute/DisputeGameFactory.sol:DisputeGameFactory | -| _disputeGameList | GameId[] | 103 | 0 | 32 | src/dispute/DisputeGameFactory.sol:DisputeGameFactory | diff --git a/packages/contracts-bedrock/scripts/Deploy.s.sol b/packages/contracts-bedrock/scripts/Deploy.s.sol index 1f9e967866c2..0b06677cd3ef 100644 --- a/packages/contracts-bedrock/scripts/Deploy.s.sol +++ b/packages/contracts-bedrock/scripts/Deploy.s.sol @@ -345,10 +345,10 @@ contract Deploy is Deployer { /// @notice Deploy the OptimismMintableERC20Factory function deployOptimismMintableERC20Factory() public broadcast returns (address addr_) { - address l1StandardBridgeProxy = mustGetAddress("L1StandardBridgeProxy"); - OptimismMintableERC20Factory factory = new OptimismMintableERC20Factory(l1StandardBridgeProxy); + OptimismMintableERC20Factory factory = new OptimismMintableERC20Factory(); - require(factory.BRIDGE() == l1StandardBridgeProxy); + require(factory.BRIDGE() == address(0)); + require(factory.bridge() == address(0)); save("OptimismMintableERC20Factory", address(factory)); console.log("OptimismMintableERC20Factory deployed at %s", address(factory)); @@ -613,9 +613,10 @@ contract Deploy is Deployer { address optimismMintableERC20Factory = mustGetAddress("OptimismMintableERC20Factory"); address l1StandardBridgeProxy = mustGetAddress("L1StandardBridgeProxy"); - proxyAdmin.upgrade({ + proxyAdmin.upgradeAndCall({ _proxy: payable(optimismMintableERC20FactoryProxy), - _implementation: optimismMintableERC20Factory + _implementation: optimismMintableERC20Factory, + _data: abi.encodeCall(OptimismMintableERC20Factory.initialize, (l1StandardBridgeProxy)) }); OptimismMintableERC20Factory factory = OptimismMintableERC20Factory(optimismMintableERC20FactoryProxy); @@ -623,6 +624,7 @@ contract Deploy is Deployer { console.log("OptimismMintableERC20Factory version: %s", version); require(factory.BRIDGE() == l1StandardBridgeProxy); + require(factory.bridge() == l1StandardBridgeProxy); } /// @notice initializeL1CrossDomainMessenger diff --git a/packages/contracts-bedrock/semver-lock.json b/packages/contracts-bedrock/semver-lock.json index 50079b7a8d25..27fd1e78ee41 100644 --- a/packages/contracts-bedrock/semver-lock.json +++ b/packages/contracts-bedrock/semver-lock.json @@ -25,7 +25,7 @@ "src/periphery/op-nft/OptimistAllowlist.sol": "0x53e9a9dfecbae036fd468e8f34c80c7d9c35bd8908c8a6483db44dbc5128ad69", "src/periphery/op-nft/OptimistInviter.sol": "0xfdd5b9d45205ef9372ba37f7a6394724695e676d27a47cb154ee6e4148490013", "src/universal/OptimismMintableERC20.sol": "0xa0b4f168802d0f9eca9ddc54347ca66c34ad7aa0fd84b01e0d7e99a9f86f46d6", - "src/universal/OptimismMintableERC20Factory.sol": "0x8afb6b634f40e8ac8c60ec7e2ca3bcd610b020d09b3cae70a3d4995722cab3ce", + "src/universal/OptimismMintableERC20Factory.sol": "0xb9d6efb5d16e62debd238e7c6abea0b48f48454eda96eb384adcc8a10f894f58", "src/universal/OptimismMintableERC721.sol": "0x49dc863caf3e002bf0c90b3af3873990fb282771f4c63735fd61a885b7873983", "src/universal/OptimismMintableERC721Factory.sol": "0x502438b009bfaf0ab187914662468261f10446fd85d44a79b29cdaef7b4982ba" } \ No newline at end of file diff --git a/packages/contracts-bedrock/src/universal/OptimismMintableERC20Factory.sol b/packages/contracts-bedrock/src/universal/OptimismMintableERC20Factory.sol index 410d6120f15c..ab859b331753 100644 --- a/packages/contracts-bedrock/src/universal/OptimismMintableERC20Factory.sol +++ b/packages/contracts-bedrock/src/universal/OptimismMintableERC20Factory.sol @@ -2,6 +2,7 @@ pragma solidity 0.8.15; import { OptimismMintableERC20 } from "../universal/OptimismMintableERC20.sol"; +import { Initializable } from "@openzeppelin/contracts/proxy/utils/Initializable.sol"; import { Semver } from "./Semver.sol"; /// @custom:proxied @@ -11,9 +12,10 @@ import { Semver } from "./Semver.sol"; /// contracts on the network it's deployed to. Simplifies the deployment process for users /// who may be less familiar with deploying smart contracts. Designed to be backwards /// compatible with the older StandardL2ERC20Factory contract. -contract OptimismMintableERC20Factory is Semver { +contract OptimismMintableERC20Factory is Semver, Initializable { /// @notice Address of the StandardBridge on this chain. - address public immutable BRIDGE; + /// @custom:network-specific + address public bridge; /// @custom:legacy /// @notice Emitted whenever a new OptimismMintableERC20 is created. Legacy version of the newer @@ -28,13 +30,25 @@ contract OptimismMintableERC20Factory is Semver { /// @param deployer Address of the account that deployed the token. event OptimismMintableERC20Created(address indexed localToken, address indexed remoteToken, address deployer); - /// @custom:semver 1.2.0 + /// @custom:semver 1.3.0 /// @notice The semver MUST be bumped any time that there is a change in /// the OptimismMintableERC20 token contract since this contract /// is responsible for deploying OptimismMintableERC20 contracts. + constructor() Semver(1, 3, 0) { + initialize({ _bridge: address(0) }); + } + + /// @notice Initializer. /// @param _bridge Address of the StandardBridge on this chain. - constructor(address _bridge) Semver(1, 2, 0) { - BRIDGE = _bridge; + function initialize(address _bridge) public reinitializer(2) { + bridge = _bridge; + } + + /// @notice Returns the address of the StandardBridge on this chain. + /// This is a legacy getter, use `bridge` instead. + /// @custom:legacy + function BRIDGE() external view returns (address) { + return bridge; } /// @custom:legacy @@ -71,7 +85,7 @@ contract OptimismMintableERC20Factory is Semver { require(_remoteToken != address(0), "OptimismMintableERC20Factory: must provide remote token address"); bytes32 salt = keccak256(abi.encode(_remoteToken, _name, _symbol)); - address localToken = address(new OptimismMintableERC20{salt: salt}(BRIDGE, _remoteToken, _name, _symbol)); + address localToken = address(new OptimismMintableERC20{salt: salt}(bridge, _remoteToken, _name, _symbol)); // Emit the old event too for legacy support. emit StandardL2TokenCreated(_remoteToken, localToken); diff --git a/packages/contracts-bedrock/test/CommonTest.t.sol b/packages/contracts-bedrock/test/CommonTest.t.sol index 3e3c953f1d73..fd1d1c4a908c 100644 --- a/packages/contracts-bedrock/test/CommonTest.t.sol +++ b/packages/contracts-bedrock/test/CommonTest.t.sol @@ -377,17 +377,17 @@ contract Bridge_Initializer is Messenger_Initializer { vm.label(address(L1Bridge_Impl), "L1StandardBridge_Impl"); // Deploy the L2StandardBridge, move it to the correct predeploy - // address and then initialize it + // address and then initialize it. It is safe to call initialize directly + // on the proxy because the bytecode was set in state with `etch`. vm.etch(Predeploys.L2_STANDARD_BRIDGE, address(new L2StandardBridge(StandardBridge(payable(proxy)))).code); L2Bridge = L2StandardBridge(payable(Predeploys.L2_STANDARD_BRIDGE)); L2Bridge.initialize(); // Set up the L2 mintable token factory - OptimismMintableERC20Factory factory = new OptimismMintableERC20Factory( - Predeploys.L2_STANDARD_BRIDGE - ); + OptimismMintableERC20Factory factory = new OptimismMintableERC20Factory(); vm.etch(Predeploys.OPTIMISM_MINTABLE_ERC20_FACTORY, address(factory).code); L2TokenFactory = OptimismMintableERC20Factory(Predeploys.OPTIMISM_MINTABLE_ERC20_FACTORY); + L2TokenFactory.initialize(Predeploys.L2_STANDARD_BRIDGE); vm.etch(Predeploys.LEGACY_ERC20_ETH, address(new LegacyERC20ETH()).code); @@ -419,7 +419,19 @@ contract Bridge_Initializer is Messenger_Initializer { ); NativeL2Token = new ERC20("Native L2 Token", "L2T"); - L1TokenFactory = new OptimismMintableERC20Factory(address(L1Bridge)); + Proxy factoryProxy = new Proxy(multisig); + OptimismMintableERC20Factory L1TokenFactoryImpl = new OptimismMintableERC20Factory(); + + vm.prank(multisig); + factoryProxy.upgradeToAndCall( + address(L1TokenFactoryImpl), + abi.encodeCall( + OptimismMintableERC20Factory.initialize, + address(L1Bridge) + ) + ); + + L1TokenFactory = OptimismMintableERC20Factory(address(factoryProxy)); RemoteL1Token = OptimismMintableERC20( L1TokenFactory.createStandardL2Token( From 1c43e3cfe65aafd7e449afd90d7c6e61ea61dfcf Mon Sep 17 00:00:00 2001 From: Mark Tyneway Date: Wed, 16 Aug 2023 15:42:20 -0700 Subject: [PATCH 4/7] op-chain-ops: check-l2 update --- op-chain-ops/cmd/check-l2/main.go | 27 ++++++++++++++++++++++++--- 1 file changed, 24 insertions(+), 3 deletions(-) diff --git a/op-chain-ops/cmd/check-l2/main.go b/op-chain-ops/cmd/check-l2/main.go index f3ac07b76819..ce7d8eea9a24 100644 --- a/op-chain-ops/cmd/check-l2/main.go +++ b/op-chain-ops/cmd/check-l2/main.go @@ -543,15 +543,36 @@ func checkOptimismMintableERC20Factory(addr common.Address, client *ethclient.Cl return err } - bridge, err := contract.BRIDGE(&bind.CallOpts{}) + bridgeLegacy, err := contract.BRIDGE(&bind.CallOpts{}) if err != nil { return err } - log.Info("OptimismMintableERC20Factory", "BRIDGE", bridge.Hex()) - if bridge == (common.Address{}) { + log.Info("OptimismMintableERC20Factory", "BRIDGE", bridgeLegacy.Hex()) + if bridgeLegacy == (common.Address{}) { return errors.New("OptimismMintableERC20Factory.BRIDGE is zero address") } + bridge, err := contract.Bridge(&bind.CallOpts{}) + if err != nil { + return err + } + if bridge == (common.Address{}) { + return errors.New("OptimismMintableERC20Factory.bridge is zero address") + } + log.Info("OptimismMintableERC20Factory", "bridge", bridge.Hex()) + + initialized, err := getInitialized("OptimismMintableERC20Factory", addr, client) + if err != nil { + return err + } + log.Info("OptimismMintableERC20Factory", "_initialized", initialized) + + initializing, err := getInitializing("OptimismMintableERC20Factory", addr, client) + if err != nil { + return err + } + log.Info("OptimismMintableERC20Factory", "_initializing", initializing) + version, err := contract.Version(&bind.CallOpts{}) if err != nil { return err From 1979a9ef9204c28ec8438327f3cb0b2dcc1bdf84 Mon Sep 17 00:00:00 2001 From: Mark Tyneway Date: Wed, 16 Aug 2023 15:57:38 -0700 Subject: [PATCH 5/7] contracts-bedrock: lint --- packages/contracts-bedrock/semver-lock.json | 2 +- .../src/universal/OptimismMintableERC20Factory.sol | 2 +- packages/contracts-bedrock/test/CommonTest.t.sol | 6 +----- 3 files changed, 3 insertions(+), 7 deletions(-) diff --git a/packages/contracts-bedrock/semver-lock.json b/packages/contracts-bedrock/semver-lock.json index 27fd1e78ee41..f4668719246a 100644 --- a/packages/contracts-bedrock/semver-lock.json +++ b/packages/contracts-bedrock/semver-lock.json @@ -25,7 +25,7 @@ "src/periphery/op-nft/OptimistAllowlist.sol": "0x53e9a9dfecbae036fd468e8f34c80c7d9c35bd8908c8a6483db44dbc5128ad69", "src/periphery/op-nft/OptimistInviter.sol": "0xfdd5b9d45205ef9372ba37f7a6394724695e676d27a47cb154ee6e4148490013", "src/universal/OptimismMintableERC20.sol": "0xa0b4f168802d0f9eca9ddc54347ca66c34ad7aa0fd84b01e0d7e99a9f86f46d6", - "src/universal/OptimismMintableERC20Factory.sol": "0xb9d6efb5d16e62debd238e7c6abea0b48f48454eda96eb384adcc8a10f894f58", + "src/universal/OptimismMintableERC20Factory.sol": "0xf4beb7fed4defc3e70b2298831bf0024cceaa8f1cf55fd98c00f5998b8ab5589", "src/universal/OptimismMintableERC721.sol": "0x49dc863caf3e002bf0c90b3af3873990fb282771f4c63735fd61a885b7873983", "src/universal/OptimismMintableERC721Factory.sol": "0x502438b009bfaf0ab187914662468261f10446fd85d44a79b29cdaef7b4982ba" } \ No newline at end of file diff --git a/packages/contracts-bedrock/src/universal/OptimismMintableERC20Factory.sol b/packages/contracts-bedrock/src/universal/OptimismMintableERC20Factory.sol index ab859b331753..233b72243873 100644 --- a/packages/contracts-bedrock/src/universal/OptimismMintableERC20Factory.sol +++ b/packages/contracts-bedrock/src/universal/OptimismMintableERC20Factory.sol @@ -41,7 +41,7 @@ contract OptimismMintableERC20Factory is Semver, Initializable { /// @notice Initializer. /// @param _bridge Address of the StandardBridge on this chain. function initialize(address _bridge) public reinitializer(2) { - bridge = _bridge; + bridge = _bridge; } /// @notice Returns the address of the StandardBridge on this chain. diff --git a/packages/contracts-bedrock/test/CommonTest.t.sol b/packages/contracts-bedrock/test/CommonTest.t.sol index fd1d1c4a908c..999dd3f8fc6d 100644 --- a/packages/contracts-bedrock/test/CommonTest.t.sol +++ b/packages/contracts-bedrock/test/CommonTest.t.sol @@ -424,11 +424,7 @@ contract Bridge_Initializer is Messenger_Initializer { vm.prank(multisig); factoryProxy.upgradeToAndCall( - address(L1TokenFactoryImpl), - abi.encodeCall( - OptimismMintableERC20Factory.initialize, - address(L1Bridge) - ) + address(L1TokenFactoryImpl), abi.encodeCall(OptimismMintableERC20Factory.initialize, address(L1Bridge)) ); L1TokenFactory = OptimismMintableERC20Factory(address(factoryProxy)); From cd05c6a2eea7d7714e2effcc7d10cdfb18f3d2f6 Mon Sep 17 00:00:00 2001 From: Mark Tyneway Date: Wed, 16 Aug 2023 16:01:19 -0700 Subject: [PATCH 6/7] storage-layout: update --- packages/contracts-bedrock/.storage-layout | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) diff --git a/packages/contracts-bedrock/.storage-layout b/packages/contracts-bedrock/.storage-layout index 5a2e3ade5dfa..05a25865a47f 100644 --- a/packages/contracts-bedrock/.storage-layout +++ b/packages/contracts-bedrock/.storage-layout @@ -259,3 +259,23 @@ ➡ src/universal/OptimismMintableERC20Factory.sol:OptimismMintableERC20Factory ======================= +| Name | Type | Slot | Offset | Bytes | Contract | +|---------------|---------|------|--------|-------|-----------------------------------------------------------------------------| +| _initialized | uint8 | 0 | 0 | 1 | src/universal/OptimismMintableERC20Factory.sol:OptimismMintableERC20Factory | +| _initializing | bool | 0 | 1 | 1 | src/universal/OptimismMintableERC20Factory.sol:OptimismMintableERC20Factory | +| bridge | address | 0 | 2 | 20 | src/universal/OptimismMintableERC20Factory.sol:OptimismMintableERC20Factory | + +======================= +➡ src/dispute/DisputeGameFactory.sol:DisputeGameFactory +======================= + +| Name | Type | Slot | Offset | Bytes | Contract | +|------------------|--------------------------------------------|------|--------|-------|-------------------------------------------------------| +| _initialized | uint8 | 0 | 0 | 1 | src/dispute/DisputeGameFactory.sol:DisputeGameFactory | +| _initializing | bool | 0 | 1 | 1 | src/dispute/DisputeGameFactory.sol:DisputeGameFactory | +| __gap | uint256[50] | 1 | 0 | 1600 | src/dispute/DisputeGameFactory.sol:DisputeGameFactory | +| _owner | address | 51 | 0 | 20 | src/dispute/DisputeGameFactory.sol:DisputeGameFactory | +| __gap | uint256[49] | 52 | 0 | 1568 | src/dispute/DisputeGameFactory.sol:DisputeGameFactory | +| gameImpls | mapping(GameType => contract IDisputeGame) | 101 | 0 | 32 | src/dispute/DisputeGameFactory.sol:DisputeGameFactory | +| _disputeGames | mapping(Hash => GameId) | 102 | 0 | 32 | src/dispute/DisputeGameFactory.sol:DisputeGameFactory | +| _disputeGameList | GameId[] | 103 | 0 | 32 | src/dispute/DisputeGameFactory.sol:DisputeGameFactory | From b911220974d150065e3173462d53929c90767b84 Mon Sep 17 00:00:00 2001 From: Mark Tyneway Date: Wed, 16 Aug 2023 16:29:09 -0700 Subject: [PATCH 7/7] contracts-bedrock: update gas snapshot --- packages/contracts-bedrock/.gas-snapshot | 28 ++++++++++++------------ 1 file changed, 14 insertions(+), 14 deletions(-) diff --git a/packages/contracts-bedrock/.gas-snapshot b/packages/contracts-bedrock/.gas-snapshot index 33e3b2028737..f2b5313146a7 100644 --- a/packages/contracts-bedrock/.gas-snapshot +++ b/packages/contracts-bedrock/.gas-snapshot @@ -17,7 +17,7 @@ AttestationStationTest:test_attest_bulk_succeeds() (gas: 703749) AttestationStationTest:test_attest_individual_succeeds() (gas: 632087) AttestationStationTest:test_attest_single_succeeds() (gas: 651325) BlockOracle_Test:test_checkpointAndLoad_succeeds() (gas: 58341) -BlockOracle_Test:test_load_noBlockHash_reverts() (gas: 13659) +BlockOracle_Test:test_load_noBlockHash_reverts() (gas: 12805) Bytes_slice_Test:test_slice_acrossMultipleWords_works() (gas: 9413) Bytes_slice_Test:test_slice_acrossWords_works() (gas: 1430) Bytes_slice_Test:test_slice_fromNonZeroIdx_works() (gas: 17240) @@ -173,7 +173,7 @@ L1CrossDomainMessenger_Test:test_relayMessage_v2_reverts() (gas: 12343) L1CrossDomainMessenger_Test:test_replayMessage_withValue_reverts() (gas: 33166) L1CrossDomainMessenger_Test:test_sendMessage_succeeds() (gas: 392870) L1CrossDomainMessenger_Test:test_sendMessage_twice_succeeds() (gas: 1669046) -L1CrossDomainMessenger_Test:test_xDomainMessageSender_reset_succeeds() (gas: 87904) +L1CrossDomainMessenger_Test:test_xDomainMessageSender_reset_succeeds() (gas: 87043) L1CrossDomainMessenger_Test:test_xDomainSender_notSet_reverts() (gas: 24253) L1ERC721Bridge_Test:test_bridgeERC721To_localTokenZeroAddress_reverts() (gas: 62677) L1ERC721Bridge_Test:test_bridgeERC721To_remoteTokenZeroAddress_reverts() (gas: 37273) @@ -217,7 +217,7 @@ L2CrossDomainMessenger_Test:test_relayMessage_toSystemContract_reverts() (gas: 3 L2CrossDomainMessenger_Test:test_relayMessage_v2_reverts() (gas: 11689) L2CrossDomainMessenger_Test:test_sendMessage_succeeds() (gas: 123768) L2CrossDomainMessenger_Test:test_sendMessage_twice_succeeds() (gas: 135434) -L2CrossDomainMessenger_Test:test_xDomainMessageSender_reset_succeeds() (gas: 49281) +L2CrossDomainMessenger_Test:test_xDomainMessageSender_reset_succeeds() (gas: 48422) L2CrossDomainMessenger_Test:test_xDomainSender_senderNotSet_reverts() (gas: 10590) L2ERC721Bridge_Test:test_bridgeERC721To_localTokenZeroAddress_reverts() (gas: 31428) L2ERC721Bridge_Test:test_bridgeERC721To_remoteTokenZeroAddress_reverts() (gas: 26826) @@ -250,12 +250,12 @@ L2OutputOracle_deleteOutputs_Test:test_deleteL2Outputs_ifNotChallenger_reverts() L2OutputOracle_deleteOutputs_Test:test_deleteL2Outputs_nonExistent_reverts() (gas: 111651) L2OutputOracle_deleteOutputs_Test:test_deleteOutputs_multipleOutputs_succeeds() (gas: 307411) L2OutputOracle_deleteOutputs_Test:test_deleteOutputs_singleOutput_succeeds() (gas: 185564) -L2OutputOracle_getter_Test:test_computeL2Timestamp_succeeds() (gas: 38198) +L2OutputOracle_getter_Test:test_computeL2Timestamp_succeeds() (gas: 37341) L2OutputOracle_getter_Test:test_getL2OutputIndexAfter_multipleOutputsExist_succeeds() (gas: 269700) L2OutputOracle_getter_Test:test_getL2OutputIndexAfter_noOutputsExis_reverts() (gas: 17892) L2OutputOracle_getter_Test:test_getL2OutputIndexAfter_previousBlock_succeeds() (gas: 98188) L2OutputOracle_getter_Test:test_getL2OutputIndexAfter_sameBlock_succeeds() (gas: 98096) -L2OutputOracle_getter_Test:test_getL2Output_succeeds() (gas: 104600) +L2OutputOracle_getter_Test:test_getL2Output_succeeds() (gas: 103735) L2OutputOracle_getter_Test:test_latestBlockNumber_succeeds() (gas: 99129) L2OutputOracle_getter_Test:test_nextBlockNumber_succeeds() (gas: 17447) L2OutputOracle_proposeL2Output_Test:test_proposeL2Output_emptyOutput_reverts() (gas: 28812) @@ -463,7 +463,7 @@ OptimismPortal_Test:test_depositTransaction_withEthValueAndContractContractCreat OptimismPortal_Test:test_depositTransaction_withEthValueAndEOAContractCreation_succeeds() (gas: 75929) OptimismPortal_Test:test_depositTransaction_withEthValueFromContract_succeeds() (gas: 83476) OptimismPortal_Test:test_depositTransaction_withEthValueFromEOA_succeeds() (gas: 84069) -OptimismPortal_Test:test_isOutputFinalized_succeeds() (gas: 127617) +OptimismPortal_Test:test_isOutputFinalized_succeeds() (gas: 126749) OptimismPortal_Test:test_minimumGasLimit_succeeds() (gas: 17430) OptimismPortal_Test:test_pause_onlyGuardian_reverts() (gas: 24487) OptimismPortal_Test:test_pause_succeeds() (gas: 27344) @@ -523,7 +523,7 @@ PreimageOracle_Test:test_loadKeccak256PreimagePart_outOfBoundsOffset_reverts() ( PreimageOracle_Test:test_loadKeccak256PreimagePart_succeeds() (gas: 76098) PreimageOracle_Test:test_loadLocalData_onePart_succeeds() (gas: 75840) PreimageOracle_Test:test_loadLocalData_outOfBoundsOffset_reverts() (gas: 8803) -ProxyAdmin_Test:test_chugsplashChangeProxyAdmin_succeeds() (gas: 36440) +ProxyAdmin_Test:test_chugsplashChangeProxyAdmin_succeeds() (gas: 35586) ProxyAdmin_Test:test_chugsplashGetProxyAdmin_succeeds() (gas: 15675) ProxyAdmin_Test:test_chugsplashGetProxyImplementation_succeeds() (gas: 51084) ProxyAdmin_Test:test_chugsplashUpgradeAndCall_succeeds() (gas: 82311) @@ -533,7 +533,7 @@ ProxyAdmin_Test:test_delegateResolvedGetProxyAdmin_succeeds() (gas: 17691) ProxyAdmin_Test:test_delegateResolvedGetProxyImplementation_succeeds() (gas: 62028) ProxyAdmin_Test:test_delegateResolvedUpgradeAndCall_succeeds() (gas: 98039) ProxyAdmin_Test:test_delegateResolvedUpgrade_succeeds() (gas: 58482) -ProxyAdmin_Test:test_erc1967ChangeProxyAdmin_succeeds() (gas: 34666) +ProxyAdmin_Test:test_erc1967ChangeProxyAdmin_succeeds() (gas: 33812) ProxyAdmin_Test:test_erc1967GetProxyAdmin_succeeds() (gas: 15616) ProxyAdmin_Test:test_erc1967GetProxyImplementation_succeeds() (gas: 52071) ProxyAdmin_Test:test_erc1967UpgradeAndCall_succeeds() (gas: 78969) @@ -551,9 +551,9 @@ Proxy_Test:test_implementationKey_succeeds() (gas: 20909) Proxy_Test:test_implementation_isZeroAddress_reverts() (gas: 47626) Proxy_Test:test_implementation_zeroAddressCaller_succeeds() (gas: 14752) Proxy_Test:test_ownerKey_succeeds() (gas: 19059) -Proxy_Test:test_ownerProxyCall_notAdmin_succeeds() (gas: 35469) +Proxy_Test:test_ownerProxyCall_notAdmin_succeeds() (gas: 34615) Proxy_Test:test_proxyCallToImp_notAdmin_succeeds() (gas: 30008) -Proxy_Test:test_upgradeToAndCall_functionDoesNotExist_reverts() (gas: 107978) +Proxy_Test:test_upgradeToAndCall_functionDoesNotExist_reverts() (gas: 104565) Proxy_Test:test_upgradeToAndCall_isPayable_succeeds() (gas: 53742) Proxy_Test:test_upgradeToAndCall_succeeds() (gas: 125190) Proxy_Test:test_upgradeTo_clashingFunctionSignatures_succeeds() (gas: 101359) @@ -646,8 +646,8 @@ StandardBridge_Stateless_Test:test_isOptimismMintableERC20_succeeds() (gas: 3307 SystemConfig_Initialize_Test:test_initialize_events_succeeds() (gas: 72059) SystemConfig_Initialize_Test:test_initialize_startBlockOverride_succeeds() (gas: 65240) SystemConfig_Initialize_Test:test_initialize_values_succeeds() (gas: 64946) -SystemConfig_Initialize_TestFail:test_initialize_lowGasLimit_reverts() (gas: 57241) -SystemConfig_Initialize_TestFail:test_initialize_startBlock_reverts() (gas: 79936) +SystemConfig_Initialize_TestFail:test_initialize_lowGasLimit_reverts() (gas: 55653) +SystemConfig_Initialize_TestFail:test_initialize_startBlock_reverts() (gas: 78350) SystemConfig_Setters_TestFail:test_setBatcherHash_notOwner_reverts() (gas: 15607) SystemConfig_Setters_TestFail:test_setGasConfig_notOwner_reverts() (gas: 15577) SystemConfig_Setters_TestFail:test_setGasLimit_notOwner_reverts() (gas: 15676) @@ -658,9 +658,9 @@ SystemConfig_Setters_TestFail:test_setResourceConfig_notOwner_reverts() (gas: 16 SystemConfig_Setters_TestFail:test_setResourceConfig_zeroDenominator_reverts() (gas: 18578) SystemConfig_Setters_TestFail:test_setUnsafeBlockSigner_notOwner_reverts() (gas: 15590) TransactorTest:test_call_succeeds() (gas: 26709) -TransactorTest:test_call_unauthorized_reverts() (gas: 18117) +TransactorTest:test_call_unauthorized_reverts() (gas: 16543) TransactorTest:test_constructor_succeeds() (gas: 9739) TransactorTest:test_delegateCall_succeeds() (gas: 20909) -TransactorTest:test_delegateCall_unauthorized_reverts() (gas: 18124) +TransactorTest:test_delegateCall_unauthorized_reverts() (gas: 16550) TransferOnionTest:test_constructor_succeeds() (gas: 564855) TransferOnionTest:test_unwrap_succeeds() (gas: 724955) \ No newline at end of file