diff --git a/.github/workflows/coverage.yml b/.github/workflows/coverage.yml index 2f092511e..389adcb83 100644 --- a/.github/workflows/coverage.yml +++ b/.github/workflows/coverage.yml @@ -42,7 +42,7 @@ jobs: run: | lcov --rc lcov_branch_coverage=1 \ --remove lcov.info \ - --output-file lcov.info "*node_modules*" "*test*" "*script*" "*DeploymentConfig*" "*Redeem*" + --output-file lcov.info "*node_modules*" "*test*" "*script*" "*DeploymentConfig*" "*Redeem*" "*deployment" - name: Report code coverage uses: zgosalvez/github-actions-report-lcov@v2 diff --git a/deterministicConfig/factoryProxy/params.json b/deterministicConfig/factoryProxy/params.json index ba250ba45..17d8c2571 100644 --- a/deterministicConfig/factoryProxy/params.json +++ b/deterministicConfig/factoryProxy/params.json @@ -1,10 +1,10 @@ { - "deployerAddress": "0x9444390c01Dd5b7249E53FAc31290F7dFF53450D", - "deterministicProxyAddress": "0x77777717174B0c89e0D284C5aF9Eca37C0f20eB5", + "deployerAddress": "0x4F9991C82C76aE04CC39f23aB909AA919886ba12", + "deterministicProxyAddress": "0x777777e60DABa3C941a1BA2f82b5B2dEEBD00f8A", "proxyCreationCode": "0x604060808152346102185761041b908138038061001b8161021d565b93843982019181818403126102185780516001600160a01b038116808203610218576020838101516001600160401b0394919391858211610218570186601f820112156102185780519061007661007183610258565b61021d565b91808352858301988682840101116102185788866100949301610273565b813b156101be577f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc80546001600160a01b031916841790556000927fbc7cd75a20ee27fd9adebab32041f755214dbc6bffa90cc0225b39da2e5c2d3b8480a28051158015906101b7575b610110575b855160d1908161034a8239f35b85519460608601908111868210176101a35786978492839261018d9952602788527f416464726573733a206c6f772d6c6576656c2064656c65676174652063616c6c87890152660819985a5b195960ca1b8a8901525190845af4913d15610199573d9061017f61007183610258565b91825281943d92013e610296565b50803880808080610103565b5060609250610296565b634e487b7160e01b84526041600452602484fd5b50826100fe565b855162461bcd60e51b815260048101859052602d60248201527f455243313936373a206e657720696d706c656d656e746174696f6e206973206e60448201526c1bdd08184818dbdb9d1c9858dd609a1b6064820152608490fd5b600080fd5b6040519190601f01601f191682016001600160401b0381118382101761024257604052565b634e487b7160e01b600052604160045260246000fd5b6001600160401b03811161024257601f01601f191660200190565b60005b8381106102865750506000910152565b8181015183820152602001610276565b919290156102f857508151156102aa575090565b3b156102b35790565b60405162461bcd60e51b815260206004820152601d60248201527f416464726573733a2063616c6c20746f206e6f6e2d636f6e74726163740000006044820152606490fd5b82519091501561030b5750805190602001fd5b6044604051809262461bcd60e51b82526020600483015261033b8151809281602486015260208686019101610273565b601f01601f19168101030190fdfe608060405236156054577f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc54600090819081906001600160a01b0316368280378136915af43d82803e156050573d90f35b3d90fd5b7f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc54600090819081906001600160a01b0316368280378136915af43d82803e156050573d90f3fea26469706673582212206025166eeb4ada632b54cc380a4ace3ecc81b0f2ed030f2e6feb8f47e8aa935264736f6c63430008110033", - "proxyDeployerAddress": "0x13c30fcbF4c50b7036881FC67Dd2E4c0068DA566", - "proxyDeployerCreationCode": "0x61016080604052346200016157620000178162000166565b601a8152602081017f44657465726d696e697374696350726f78794465706c6f796572000000000000815260405191620000518362000166565b6001835260208301603160f81b81526200006b8262000182565b926101209384526200007d8562000355565b92610140938452519020938460e05251902091610100938385524660a0526040519360208501917f8b73c3c69bb8fe3d512ecc4cf759cc79239f7b179b0ffacaa9a75d522b39400f8352604086015260608501524660808501523060a085015260a0845260c084019380851060018060401b038611176200014b57846040525190206080523060c052611654938462000503853960805184610be4015260a05184610caf015260c05184610bae015260e05184610c3301525183610c590152518260e8015251816101120152f35b634e487b7160e01b600052604160045260246000fd5b600080fd5b604081019081106001600160401b038211176200014b57604052565b8051602091908281101562000221575090601f825111620001c05780825192015190808310620001b157501790565b82600019910360031b1b161790565b90604051809263305a27a960e01b82528060048301528251908160248401526000935b82851062000207575050604492506000838284010152601f80199101168101030190fd5b8481018201518686016044015293810193859350620001e3565b6001600160401b0381116200014b576000928354926001938481811c911680156200034a575b838210146200033657601f811162000300575b5081601f841160011462000299575092829391839286946200028d575b50501b916000199060031b1c191617905560ff90565b01519250388062000277565b919083601f1981168780528488209488905b88838310620002e55750505010620002cb575b505050811b01905560ff90565b015160001960f88460031b161c19169055388080620002be565b858701518855909601959485019487935090810190620002ab565b85805284601f848820920160051c820191601f860160051c015b8281106200032a5750506200025a565b8781550185906200031a565b634e487b7160e01b86526022600452602486fd5b90607f169062000247565b805160209081811015620003e35750601f825111620003825780825192015190808310620001b157501790565b90604051809263305a27a960e01b82528060048301528251908160248401526000935b828510620003c9575050604492506000838284010152601f80199101168101030190fd5b8481018201518686016044015293810193859350620003a5565b9192916001600160401b0381116200014b5760019182548381811c91168015620004f7575b82821014620004e157601f8111620004a8575b5080601f83116001146200045b5750819293946000926200044f575b5050600019600383901b1c191690821b17905560ff90565b01519050388062000437565b90601f198316958460005282600020926000905b888210620004905750508385969710620002cb57505050811b01905560ff90565b8087859682949686015181550195019301906200046f565b8360005283601f83600020920160051c820191601f850160051c015b828110620004d45750506200041b565b60008155018490620004c4565b634e487b7160e01b600052602260045260246000fd5b90607f16906200040856fe6040608081526004908136101561001557600080fd5b600091823560e01c80633486f857146104fe5780634e486aab146104a95780637621fd67146104465780637ff95ee8146101ef57806384b0196e146100d15763a2c8dd9e1461006357600080fd5b346100cd5760603660031901126100cd576001600160401b036024358181116100c957610093903690840161060c565b9190946044359182116100c6575091602094916100b66100bf943690840161060c565b93909235610cd5565b9051908152f35b80fd5b8480fd5b8280fd5b5090346100cd57826003193601126100cd5761010c7f0000000000000000000000000000000000000000000000000000000000000000610717565b926101367f000000000000000000000000000000000000000000000000000000000000000061081f565b90825192602092838501958587106001600160401b038811176101da57509280610190838896610183998b9996528686528151998a99600f60f81b8b5260e0868c015260e08b019061068d565b91898303908a015261068d565b924660608801523060808801528460a088015286840360c088015251928381520193925b8281106101c357505050500390f35b8351855286955093810193928101926001016101b4565b604190634e487b7160e01b6000525260246000fd5b5090346100cd5760e03660031901126100cd5760248035928035916001600160401b036044358181116103f057610229903690850161060c565b94909161023461063e565b9761023d610654565b9360a4359760018060a01b0394858a16998a81036104425760c43586811161043e576102a161029986610293898f6102a6978f8b61028261028b948d9b36910161060c565b9790958b610af8565b9236916108ef565b90610a3b565b919091610926565b610e0d565b8a51610763808201908282108883111761042b578f928092602092610ebc8339308152030191f5908115610421578a51928660208501931683528b808501528d60608501526060845260808401958487109087111761040f576020610343948f88958f868c9b9761033e978d9c99610332945260a087013784019160a08301938452845193849161066a565b010380855201836106f6565b610d61565b98169716968088036103f45750863b156103f0578551631b2ce7f360e11b815291168382015286818381838a5af180156103e6576103d1575b50908591853b156100cd57845193849263189acdbd60e31b84528301528183875af180156103c7576103b3575b6020838351908152f35b6103bd84916106b2565b6100cd57826103a9565b82513d86823e3d90fd5b6103de90969192966106b2565b94903861037c565b85513d89823e3d90fd5b8780fd5b8488856044938a51936312ae30e560e01b8552840152820152fd5b634e487b7160e01b8e5260418a52888efd5b8a513d8e823e3d90fd5b50634e487b7160e01b8f5260418b52898ffd5b8e80fd5b8d80fd5b5082346100c657826003193601126100c657602435906001600160401b0382116100c6576020610499856104918661048a6104833689840161060c565b36916108ef565b9035610a3b565b929092610926565b516001600160a01b039091168152f35b5091346100c65760a03660031901126100c657604435906001600160401b0382116100c657506020926104e26100bf923690830161060c565b6104ea61063e565b916104f3610654565b936024359035610af8565b50919034610608576080366003190112610608576001600160401b039183356024358481116100cd57610534903690870161060c565b91906044358681116100c95761054d903690890161060c565b9390966064359081116106045792610594859361059a93610483846102a16102998f9b8f610293908f9e8f9e61028b916105899136910161060c565b9490928a8c8a610cd5565b90610d61565b9581865192839283378101838152039082875af1903d156105fe573d906105c0826108d4565b916105cd855193846106f6565b825260203d92013e5b156105ef57516001600160a01b03909116815260209150f35b5163dc94ae4b60e01b81529050fd5b506105d6565b8580fd5b5080fd5b9181601f84011215610639578235916001600160401b038311610639576020838186019501011161063957565b600080fd5b606435906001600160a01b038216820361063957565b608435906001600160a01b038216820361063957565b60005b83811061067d5750506000910152565b818101518382015260200161066d565b906020916106a68151809281855285808601910161066a565b601f01601f1916010190565b6001600160401b0381116106c557604052565b634e487b7160e01b600052604160045260246000fd5b604081019081106001600160401b038211176106c557604052565b90601f801991011681019081106001600160401b038211176106c557604052565b60ff81146107555760ff811690601f82116107435760405191610739836106db565b8252602082015290565b604051632cd44ac360e21b8152600490fd5b506040516000805490600182811c90808416938415610815575b602094858410811461080157838752869493929181156107e157506001146107a3575b50506107a0925003826106f6565b90565b600080805285812095935091905b8183106107c95750506107a093508201013880610792565b855487840185015294850194869450918301916107b1565b9150506107a094925060ff191682840152151560051b8201013880610792565b634e487b7160e01b85526022600452602485fd5b91607f169161076f565b60ff81146108415760ff811690601f82116107435760405191610739836106db565b50604051600060019081549182811c908084169384156108ca575b602094858410811461080157838752869493929181156107e1575060011461088c5750506107a0925003826106f6565b600081815285812095935091905b8183106108b25750506107a093508201013880610792565b8554878401850152948501948694509183019161089a565b91607f169161085c565b6001600160401b0381116106c557601f01601f191660200190565b9291926108fb826108d4565b9161090960405193846106f6565b829481845281830111610639578281602093846000960137010152565b6005811015610a2557806109375750565b6001810361097f5760405162461bcd60e51b815260206004820152601860248201527745434453413a20696e76616c6964207369676e617475726560401b6044820152606490fd5b600281036109cc5760405162461bcd60e51b815260206004820152601f60248201527f45434453413a20696e76616c6964207369676e6174757265206c656e677468006044820152606490fd5b6003146109d557565b60405162461bcd60e51b815260206004820152602260248201527f45434453413a20696e76616c6964207369676e6174757265202773272076616c604482015261756560f01b6064820152608490fd5b634e487b7160e01b600052602160045260246000fd5b906041815114600014610a6957610a65916020820151906060604084015193015160001a90610a73565b9091565b5050600090600290565b9291906fa2a8918ca85bafe22016d0b997e4df60600160ff1b038311610aec5791608094939160ff602094604051948552168484015260408301526060820152600093849182805260015afa15610adf5781516001600160a01b03811615610ad9579190565b50600190565b50604051903d90823e3d90fd5b50505050600090600390565b939291610b0891959236916108ef565b602081519101206040519460208601947f4f2bfcc23c1adbe54973f469f111f1848a62d32cc4a906c7a5ced17481b366ea865260408701526060860152608085015260018060a01b0380921660a08501521660c083015260c0825260e08201918083106001600160401b038411176106c5576107a0926040525190205b604290610b90610bab565b906040519161190160f01b8352600283015260228201522090565b307f00000000000000000000000000000000000000000000000000000000000000006001600160a01b03161480610cac575b15610c06577f000000000000000000000000000000000000000000000000000000000000000090565b60405160208101907f8b73c3c69bb8fe3d512ecc4cf759cc79239f7b179b0ffacaa9a75d522b39400f82527f000000000000000000000000000000000000000000000000000000000000000060408201527f000000000000000000000000000000000000000000000000000000000000000060608201524660808201523060a082015260a0815260c081018181106001600160401b038211176106c55760405251902090565b507f00000000000000000000000000000000000000000000000000000000000000004614610bdd565b9290610ce690610cf59336916108ef565b602081519101209336916108ef565b602081519101206040519260208401927f11ebd6670048529a84d03c14cb6bf8539a7ce6288dd624a22bb7111cacc9358e84526040850152606084015260808301526080825260a08201918083106001600160401b038411176106c5576107a092604052519020610b85565b90805115610dc9576020815191016000f5906001600160a01b03821615610d8457565b60405162461bcd60e51b815260206004820152601960248201527f437265617465323a204661696c6564206f6e206465706c6f79000000000000006044820152606490fd5b606460405162461bcd60e51b815260206004820152602060248201527f437265617465323a2062797465636f6465206c656e677468206973207a65726f6044820152fd5b60018060a01b03168160601c14908115610ea3575b5015610e2a57565b60405162461bcd60e51b815260206004820152604560248201527f496e76616c69642073616c74202d206669727374203230206279746573206f6660448201527f207468652073616c74206d757374206d617463682063616c6c696e67206164646064820152643932b9b99760d91b608482015260a490fd5b6bffffffffffffffffffffffff191615905038610e2256fe60c03461008b57601f61076338819003918201601f19168301916001600160401b038311848410176100905780849260209460405283398101031261008b57516001600160a01b038116810361008b573060805260a0526040516106bc90816100a782396080518181816058015281816101280152610394015260a05181818161016d01526103da0152f35b600080fd5b634e487b7160e01b600052604160045260246000fdfe608060408181526004918236101561001657600080fd5b600090813560e01c9081633659cfe61461036a575080634f1ef286146100ad576352d1902d1461004557600080fd5b346100aa57806003193601126100aa57507f00000000000000000000000000000000000000000000000000000000000000006001600160a01b0316300361009d57602090516000805160206106678339815191528152f35b51635e4c25f160e01b8152fd5b80fd5b509080600319360112610366576100c2610587565b9060243567ffffffffffffffff811161036257366023820112156103625780850135906100ee826105da565b6100fa845191826105a2565b8281526020928382019236602483830101116103035781889260248793018637830101526001600160a01b037f00000000000000000000000000000000000000000000000000000000000000008116903082146103525760008051602061066783398151915291818354160361034257807f000000000000000000000000000000000000000000000000000000000000000016330361030e577f4910fdfa16fed3260ed0e7147f7cc6da11a60208b5b9406d12a635614ffd91435460ff16156101d1575050505050506101ce9192506105f6565b80f35b86979597169087516352d1902d60e01b815285818b81865afa8791816102db575b5061020757885163e5ec176960e01b81528a90fd5b989293949698979597036102cc5761021e886105f6565b8451907fbc7cd75a20ee27fd9adebab32041f755214dbc6bffa90cc0225b39da2e5c2d3b8880a28251158015906102c4575b610260575b505050505050905080f35b873b156102b857505093809581926102a19651915af4903d156102ae573d61029361028a826105da565b925192836105a2565b81528481933d92013e61063d565b5080388080808080610255565b506060915061063d565b63369891e760e01b8152fd5b506001610250565b5083516308373ebf60e41b8152fd5b9091508681813d8311610307575b6102f381836105a2565b81010312610303575190386101f2565b8780fd5b503d6102e9565b855162461bcd60e51b8152808a01869052600e60248201526d1b9bdd08185d5d1a1bdc9a5e995960921b6044820152606490fd5b85516364cd8d1960e01b81528990fd5b8551631932df4560e01b81528990fd5b8380fd5b5080fd5b91929050346105835760208060031936011261036257610388610587565b926001600160a01b03907f0000000000000000000000000000000000000000000000000000000000000000821690308214610575575060008051602061066783398151915290828254160361056557817f0000000000000000000000000000000000000000000000000000000000000000163303610531578351908382019282841067ffffffffffffffff85111761051e578386528783527f4910fdfa16fed3260ed0e7147f7cc6da11a60208b5b9406d12a635614ffd91435460ff161561045b575050505050506101ce9192506105f6565b86979597169087516352d1902d60e01b815285818b81865afa8791816104ef575b5061049157885163e5ec176960e01b81528a90fd5b989293949698979597036102cc576104a8886105f6565b8451907fbc7cd75a20ee27fd9adebab32041f755214dbc6bffa90cc0225b39da2e5c2d3b8880a28251158015906104e85761026057505050505050905080f35b5086610250565b9091508681813d8311610517575b61050781836105a2565b810103126103035751903861047c565b503d6104fd565b634e487b7160e01b885260418952602488fd5b835162461bcd60e51b8152808801849052600e60248201526d1b9bdd08185d5d1a1bdc9a5e995960921b6044820152606490fd5b83516364cd8d1960e01b81528790fd5b631932df4560e01b81528790fd5b8280fd5b600435906001600160a01b038216820361059d57565b600080fd5b90601f8019910116810190811067ffffffffffffffff8211176105c457604052565b634e487b7160e01b600052604160045260246000fd5b67ffffffffffffffff81116105c457601f01601f191660200190565b803b1561062b5760008051602061066783398151915280546001600160a01b0319166001600160a01b03909216919091179055565b60405163529880eb60e01b8152600490fd5b156106455790565b80511561065457805190602001fd5b6040516350a28c9b60e11b8152600490fdfe360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbca264697066735822122045956a6c2f86f27f4001483acf6a61195441ac40433c504ce3ac6d6bef8b1b1864736f6c63430008110033a2646970667358221220114f022292a418cbe0db59aa75af37529b0c83b91c282cd1b5df40001ca338e364736f6c63430008110033", + "proxyDeployerAddress": "0x6d694a5394BFe227CA2321669BA43221e9Fc971D", + "proxyDeployerCreationCode": "0x61016080604052346200016057620000178162000165565b60178152602081017f4e6577466163746f727950726f78794465706c6f796572000000000000000000815260405191620000518362000165565b6001835260208301603160f81b81526200006b8262000181565b926101209384526200007d8562000354565b92610140938452519020938460e05251902091610100938385524660a0526040519360208501917f8b73c3c69bb8fe3d512ecc4cf759cc79239f7b179b0ffacaa9a75d522b39400f8352604086015260608501524660808501523060a085015260a0845260c084019380851060018060401b038611176200014a57846040525190206080523060c05261143f938462000502853960805184610bb5015260a05184610c80015260c05184610b7f015260e05184610c0401525183610c2a01525182606101525181608b0152f35b634e487b7160e01b600052604160045260246000fd5b600080fd5b604081019081106001600160401b038211176200014a57604052565b8051602091908281101562000220575090601f825111620001bf5780825192015190808310620001b057501790565b82600019910360031b1b161790565b90604051809263305a27a960e01b82528060048301528251908160248401526000935b82851062000206575050604492506000838284010152601f80199101168101030190fd5b8481018201518686016044015293810193859350620001e2565b6001600160401b0381116200014a576000928354926001938481811c9116801562000349575b838210146200033557601f8111620002ff575b5081601f841160011462000298575092829391839286946200028c575b50501b916000199060031b1c191617905560ff90565b01519250388062000276565b919083601f1981168780528488209488905b88838310620002e45750505010620002ca575b505050811b01905560ff90565b015160001960f88460031b161c19169055388080620002bd565b858701518855909601959485019487935090810190620002aa565b85805284601f848820920160051c820191601f860160051c015b8281106200032957505062000259565b87815501859062000319565b634e487b7160e01b86526022600452602486fd5b90607f169062000246565b805160209081811015620003e25750601f825111620003815780825192015190808310620001b057501790565b90604051809263305a27a960e01b82528060048301528251908160248401526000935b828510620003c8575050604492506000838284010152601f80199101168101030190fd5b8481018201518686016044015293810193859350620003a4565b9192916001600160401b0381116200014a5760019182548381811c91168015620004f6575b82821014620004e057601f8111620004a7575b5080601f83116001146200045a5750819293946000926200044e575b5050600019600383901b1c191690821b17905560ff90565b01519050388062000436565b90601f198316958460005282600020926000905b8882106200048f5750508385969710620002ca57505050811b01905560ff90565b8087859682949686015181550195019301906200046e565b8360005283601f83600020920160051c820191601f850160051c015b828110620004d35750506200041a565b60008155018490620004c3565b634e487b7160e01b600052602260045260246000fd5b90607f16906200040756fe60406080815260048036101561001457600080fd5b600091823560e01c806315d06c3114610544578063409bdf89146104e8578063825748bc1461016c576384b0196e1461004c57600080fd5b346101685782600319360112610168576100857f00000000000000000000000000000000000000000000000000000000000000006106f9565b926100af7f0000000000000000000000000000000000000000000000000000000000000000610801565b90825192602092838501958587106001600160401b03881117610153575092806101098388966100fc998b9996528686528151998a99600f60f81b8b5260e0868c015260e08b019061066f565b91898303908a015261066f565b924660608801523060808801528460a088015286840360c088015251928381520193925b82811061013c57505050500390f35b83518552869550938101939281019260010161012d565b604190634e487b7160e01b6000525260246000fd5b8280fd5b50346101685760e0366003190112610168578135926001600160401b0392604435848111610168576101a190369083016105ee565b9190946101ac610620565b956101b5610636565b9060a4359260018060a01b0391828516968786036104e45760c4358381116104e0578c859136908a01906101e8916105ee565b916024998986888d356101fa95610ace565b913690610206926108b6565b61020f91610a11565b610218906108fc565b168c60601c1480156104c9575b156104535789519b8c6107638082019182108683111761044157908e91610ca7833930815260209e8f910301908bf590811561043757908c91858c51938401921682528b808401528a60608401526060835260808301948386109086111761042557918a8e926102b26102be958f8990528060a0860198893784019160a08301938452845193849161064c565b010380855201836106d8565b8151156103e557908291853591519089f5169788156103a35781168089036103885750873b15610384578651631b2ce7f360e11b815291168382015284818381838b5af1801561037a57610367575b50853b1561036357908391855193849263189acdbd60e31b84528301528183885af1801561035957610342575b505051908152f35b61034c8291610694565b610356578061033a565b80fd5b83513d84823e3d90fd5b8380fd5b61037390949194610694565b923861030d565b86513d87823e3d90fd5b8580fd5b8489856044938b51936312ae30e560e01b8552840152820152fd5b875162461bcd60e51b81528086018b90526019818601527f437265617465323a204661696c6564206f6e206465706c6f79000000000000006044820152606490fd5b6064868c87818d519362461bcd60e51b85528401528201527f437265617465323a2062797465636f6465206c656e677468206973207a65726f6044820152fd5b634e487b7160e01b8b5260418952878bfd5b8a513d8b823e3d90fd5b634e487b7160e01b8c5260418a52888cfd5b895162461bcd60e51b81526020818901526045818801527f496e76616c69642073616c74202d206669727374203230206279746573206f6660448201527f207468652073616c74206d757374206d617463682063616c6c696e67206164646064820152643932b9b99760d91b608482015260a490fd5b506bffffffffffffffffffffffff198c1615610225565b8980fd5b8880fd5b5082346103565760a036600319011261035657604435906001600160401b038211610356575060209261052161053d92369083016105ee565b610529610620565b91610532610636565b936024359035610ace565b9051908152f35b509190346105ea5760c03660031901126105ea576001600160401b03916044358381116105ea5761057890369084016105ee565b610583949194610620565b9161058c610636565b9360a4359182116103565760206105da896105d28a6105cc8b6105c48c8c8c6105b7368e87016105ee565b9790956024359035610ace565b9236916108b6565b90610a11565b9290926108fc565b516001600160a01b039091168152f35b5080fd5b9181601f8401121561061b578235916001600160401b03831161061b576020838186019501011161061b57565b600080fd5b606435906001600160a01b038216820361061b57565b608435906001600160a01b038216820361061b57565b60005b83811061065f5750506000910152565b818101518382015260200161064f565b906020916106888151809281855285808601910161064c565b601f01601f1916010190565b6001600160401b0381116106a757604052565b634e487b7160e01b600052604160045260246000fd5b604081019081106001600160401b038211176106a757604052565b90601f801991011681019081106001600160401b038211176106a757604052565b60ff81146107375760ff811690601f8211610725576040519161071b836106bd565b8252602082015290565b604051632cd44ac360e21b8152600490fd5b506040516000805490600182811c908084169384156107f7575b60209485841081146107e357838752869493929181156107c35750600114610785575b5050610782925003826106d8565b90565b600080805285812095935091905b8183106107ab57505061078293508201013880610774565b85548784018501529485019486945091830191610793565b91505061078294925060ff191682840152151560051b8201013880610774565b634e487b7160e01b85526022600452602485fd5b91607f1691610751565b60ff81146108235760ff811690601f8211610725576040519161071b836106bd565b50604051600060019081549182811c908084169384156108ac575b60209485841081146107e357838752869493929181156107c3575060011461086e575050610782925003826106d8565b600081815285812095935091905b81831061089457505061078293508201013880610774565b8554878401850152948501948694509183019161087c565b91607f169161083e565b9291926001600160401b0382116106a757604051916108df601f8201601f1916602001846106d8565b82948184528183011161061b578281602093846000960137010152565b60058110156109fb578061090d5750565b600181036109555760405162461bcd60e51b815260206004820152601860248201527745434453413a20696e76616c6964207369676e617475726560401b6044820152606490fd5b600281036109a25760405162461bcd60e51b815260206004820152601f60248201527f45434453413a20696e76616c6964207369676e6174757265206c656e677468006044820152606490fd5b6003146109ab57565b60405162461bcd60e51b815260206004820152602260248201527f45434453413a20696e76616c6964207369676e6174757265202773272076616c604482015261756560f01b6064820152608490fd5b634e487b7160e01b600052602160045260246000fd5b906041815114600014610a3f57610a3b916020820151906060604084015193015160001a90610a49565b9091565b5050600090600290565b9291906fa2a8918ca85bafe22016d0b997e4df60600160ff1b038311610ac25791608094939160ff602094604051948552168484015260408301526060820152600093849182805260015afa15610ab55781516001600160a01b03811615610aaf579190565b50600190565b50604051903d90823e3d90fd5b50505050600090600390565b939291610ade91959236916108b6565b602081519101206040519460208601947f4f2bfcc23c1adbe54973f469f111f1848a62d32cc4a906c7a5ced17481b366ea865260408701526060860152608085015260018060a01b0380921660a08501521660c083015260c0825260e08201918083106001600160401b038411176106a757604292604052519020610b61610b7c565b906040519161190160f01b8352600283015260228201522090565b307f00000000000000000000000000000000000000000000000000000000000000006001600160a01b03161480610c7d575b15610bd7577f000000000000000000000000000000000000000000000000000000000000000090565b60405160208101907f8b73c3c69bb8fe3d512ecc4cf759cc79239f7b179b0ffacaa9a75d522b39400f82527f000000000000000000000000000000000000000000000000000000000000000060408201527f000000000000000000000000000000000000000000000000000000000000000060608201524660808201523060a082015260a0815260c081018181106001600160401b038211176106a75760405251902090565b507f00000000000000000000000000000000000000000000000000000000000000004614610bae56fe60c03461008b57601f61076338819003918201601f19168301916001600160401b038311848410176100905780849260209460405283398101031261008b57516001600160a01b038116810361008b573060805260a0526040516106bc90816100a782396080518181816058015281816101280152610394015260a05181818161016d01526103da0152f35b600080fd5b634e487b7160e01b600052604160045260246000fdfe608060408181526004918236101561001657600080fd5b600090813560e01c9081633659cfe61461036a575080634f1ef286146100ad576352d1902d1461004557600080fd5b346100aa57806003193601126100aa57507f00000000000000000000000000000000000000000000000000000000000000006001600160a01b0316300361009d57602090516000805160206106678339815191528152f35b51635e4c25f160e01b8152fd5b80fd5b509080600319360112610366576100c2610587565b9060243567ffffffffffffffff811161036257366023820112156103625780850135906100ee826105da565b6100fa845191826105a2565b8281526020928382019236602483830101116103035781889260248793018637830101526001600160a01b037f00000000000000000000000000000000000000000000000000000000000000008116903082146103525760008051602061066783398151915291818354160361034257807f000000000000000000000000000000000000000000000000000000000000000016330361030e577f4910fdfa16fed3260ed0e7147f7cc6da11a60208b5b9406d12a635614ffd91435460ff16156101d1575050505050506101ce9192506105f6565b80f35b86979597169087516352d1902d60e01b815285818b81865afa8791816102db575b5061020757885163e5ec176960e01b81528a90fd5b989293949698979597036102cc5761021e886105f6565b8451907fbc7cd75a20ee27fd9adebab32041f755214dbc6bffa90cc0225b39da2e5c2d3b8880a28251158015906102c4575b610260575b505050505050905080f35b873b156102b857505093809581926102a19651915af4903d156102ae573d61029361028a826105da565b925192836105a2565b81528481933d92013e61063d565b5080388080808080610255565b506060915061063d565b63369891e760e01b8152fd5b506001610250565b5083516308373ebf60e41b8152fd5b9091508681813d8311610307575b6102f381836105a2565b81010312610303575190386101f2565b8780fd5b503d6102e9565b855162461bcd60e51b8152808a01869052600e60248201526d1b9bdd08185d5d1a1bdc9a5e995960921b6044820152606490fd5b85516364cd8d1960e01b81528990fd5b8551631932df4560e01b81528990fd5b8380fd5b5080fd5b91929050346105835760208060031936011261036257610388610587565b926001600160a01b03907f0000000000000000000000000000000000000000000000000000000000000000821690308214610575575060008051602061066783398151915290828254160361056557817f0000000000000000000000000000000000000000000000000000000000000000163303610531578351908382019282841067ffffffffffffffff85111761051e578386528783527f4910fdfa16fed3260ed0e7147f7cc6da11a60208b5b9406d12a635614ffd91435460ff161561045b575050505050506101ce9192506105f6565b86979597169087516352d1902d60e01b815285818b81865afa8791816104ef575b5061049157885163e5ec176960e01b81528a90fd5b989293949698979597036102cc576104a8886105f6565b8451907fbc7cd75a20ee27fd9adebab32041f755214dbc6bffa90cc0225b39da2e5c2d3b8880a28251158015906104e85761026057505050505050905080f35b5086610250565b9091508681813d8311610517575b61050781836105a2565b810103126103035751903861047c565b503d6104fd565b634e487b7160e01b885260418952602488fd5b835162461bcd60e51b8152808801849052600e60248201526d1b9bdd08185d5d1a1bdc9a5e995960921b6044820152606490fd5b83516364cd8d1960e01b81528790fd5b631932df4560e01b81528790fd5b8280fd5b600435906001600160a01b038216820361059d57565b600080fd5b90601f8019910116810190811067ffffffffffffffff8211176105c457604052565b634e487b7160e01b600052604160045260246000fd5b67ffffffffffffffff81116105c457601f01601f191660200190565b803b1561062b5760008051602061066783398151915280546001600160a01b0319166001600160a01b03909216919091179055565b60405163529880eb60e01b8152600490fd5b156106455790565b80511561065457805190602001fd5b6040516350a28c9b60e11b8152600490fdfe360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbca264697066735822122045956a6c2f86f27f4001483acf6a61195441ac40433c504ce3ac6d6bef8b1b1864736f6c63430008110033a2646970667358221220dabba1dcd032491f8a97dc59455163d769d7f2c0092154bc5aa3845d80c470a464736f6c63430008110033", "proxyDeployerSalt": "0x0000000000000000000000000000000000000000668d7f9ec18e35000dbaba0e", - "proxySalt": "0x330a1b759446fcaf321db98337cb4c9aef25c4a0660186f405dc35e33bc8f900", - "proxyShimSalt": "0x9444390c01dd5b7249e53fac31290f7dff53450d000000000000000000000064" + "proxySalt": "0x57438c1eada39e73013d03d72fcafc19fc93a4cced6f6a87f8035e46c80079e2", + "proxyShimSalt": "0x4f9991c82c76ae04cc39f23ab909aa919886ba12000000000000000000000064" } \ No newline at end of file diff --git a/deterministicConfig/factoryProxy/signatures.json b/deterministicConfig/factoryProxy/signatures.json new file mode 100644 index 000000000..641abfca1 --- /dev/null +++ b/deterministicConfig/factoryProxy/signatures.json @@ -0,0 +1,13 @@ +{ + "1": "0x2933443bc97517731893d612ce5d51bc980b9185efce2826e58721fa59ad517123e72be886717639b75eb30380f8b0feee3b36c94c4bb31b2e99ad3b1f0e1bd81c", + "5": "0xaef23e2b095dcdd758e3c57f75e3b96245ec5f4339175946aa2abd829f8f389935e365987c1dfe3ef3fbf12ff30810351cbc3af6e7f225abfee9d8d11d15abb51b", + "10": "0x7bceed3c7695faaed17d15c52f9153b5faa94b8144d8517437d334578a41f98269d78cfefe0b4869c3c5098cc495f9ea4e8b8f4a530e6d8f28c7bf35c52ea7971b", + "420": "0x303b4c1d43bdaf0985e82f97e31ed69af5b00f979d6b2d9bbf4ad41f16ba525e319198f63ebc6aeff44f70bc12b04578d12fd39e2b830e47d6477f9b5eae9d8d1b", + "424": "0x1cf2cfb0a1bbfee57ad8e72e5e6c81262c6892e3726350bcf069d035c74e70f57dcbe7dfba5ab64c7e440fb5faacd31a798e453094c3de34a6ebb26db644acce1b", + "999": "0x16546150074572fa72cf1e66b635b196c02e4cc95f0d465dbfe5cf09a452fe6b4b748990ed760be3b1620b6df53787baac3bc3f1755ebcc228690ff5b7744de81c", + "8453": "0xda5c219fab6e1be7ad156d002cca90af281dd17a003a9719c76e99ac34568bb62b726d72d025b852dddaae26d26dc1a2508b24a803e7338615df532b49b8d0ed1c", + "58008": "0x00bbddd17272d09cdc81521daa09101777017ed1662077a46215b4bc9136622c1574d5768b95310d7fe5fff9d1803653dbb70dba5fdcf1a442af9893431f64dc1b", + "84531": "0x2bd795e9c7dc06c52d52626d5ce93b8ab5dab38c64dd2527d3d07be053c5d2f679648c00c302bc684abbae1b517eaf4435edf1873d74ecbd12d2c160fa8001ec1c", + "7777777": "0x0d33c46e997d3487f08bc153c5d6dac7dbff21057bd2d6ec857e7140f51879ce73e2fb23ae705c2d1bd1316caaaf5f8258ad404a595cafd3a28a622d0dba18b51b", + "11155111": "0x3e09018c6aa6ef37fdade862ef28d9799debd800552a80a0748adaa967d20a095463dbdcaeecf61a6fd9aa2514b24d01947bbb05c8ca7a5383e00da47d52fd941c" +} \ No newline at end of file diff --git a/deterministicConfig/premintExecutorProxy/params.json b/deterministicConfig/premintExecutorProxy/params.json index 3f25d8cdd..d146dc12a 100644 --- a/deterministicConfig/premintExecutorProxy/params.json +++ b/deterministicConfig/premintExecutorProxy/params.json @@ -1,10 +1,10 @@ { - "deployerAddress": "0x9444390c01Dd5b7249E53FAc31290F7dFF53450D", - "deterministicProxyAddress": "0x777777AEEb23414EC2DAEBE5899EF97157379bdf", + "deployerAddress": "0x4F9991C82C76aE04CC39f23aB909AA919886ba12", + "deterministicProxyAddress": "0x7777770cbCc9Df2D3f3AEB158fd2106e20c598bA", "proxyCreationCode": "0x604060808152346102185761041b908138038061001b8161021d565b93843982019181818403126102185780516001600160a01b038116808203610218576020838101516001600160401b0394919391858211610218570186601f820112156102185780519061007661007183610258565b61021d565b91808352858301988682840101116102185788866100949301610273565b813b156101be577f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc80546001600160a01b031916841790556000927fbc7cd75a20ee27fd9adebab32041f755214dbc6bffa90cc0225b39da2e5c2d3b8480a28051158015906101b7575b610110575b855160d1908161034a8239f35b85519460608601908111868210176101a35786978492839261018d9952602788527f416464726573733a206c6f772d6c6576656c2064656c65676174652063616c6c87890152660819985a5b195960ca1b8a8901525190845af4913d15610199573d9061017f61007183610258565b91825281943d92013e610296565b50803880808080610103565b5060609250610296565b634e487b7160e01b84526041600452602484fd5b50826100fe565b855162461bcd60e51b815260048101859052602d60248201527f455243313936373a206e657720696d706c656d656e746174696f6e206973206e60448201526c1bdd08184818dbdb9d1c9858dd609a1b6064820152608490fd5b600080fd5b6040519190601f01601f191682016001600160401b0381118382101761024257604052565b634e487b7160e01b600052604160045260246000fd5b6001600160401b03811161024257601f01601f191660200190565b60005b8381106102865750506000910152565b8181015183820152602001610276565b919290156102f857508151156102aa575090565b3b156102b35790565b60405162461bcd60e51b815260206004820152601d60248201527f416464726573733a2063616c6c20746f206e6f6e2d636f6e74726163740000006044820152606490fd5b82519091501561030b5750805190602001fd5b6044604051809262461bcd60e51b82526020600483015261033b8151809281602486015260208686019101610273565b601f01601f19168101030190fdfe608060405236156054577f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc54600090819081906001600160a01b0316368280378136915af43d82803e156050573d90f35b3d90fd5b7f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc54600090819081906001600160a01b0316368280378136915af43d82803e156050573d90f3fea26469706673582212206c4dcbca55999ff942c0fb847439fecf042b44555b3c49500e153a99fd59cb8964736f6c63430008110033", - "proxyDeployerAddress": "0x13c30fcbF4c50b7036881FC67Dd2E4c0068DA566", - "proxyDeployerCreationCode": "0x61016080604052346200016157620000178162000166565b601a8152602081017f44657465726d696e697374696350726f78794465706c6f796572000000000000815260405191620000518362000166565b6001835260208301603160f81b81526200006b8262000182565b926101209384526200007d8562000355565b92610140938452519020938460e05251902091610100938385524660a0526040519360208501917f8b73c3c69bb8fe3d512ecc4cf759cc79239f7b179b0ffacaa9a75d522b39400f8352604086015260608501524660808501523060a085015260a0845260c084019380851060018060401b038611176200014b57846040525190206080523060c052611654938462000503853960805184610be4015260a05184610caf015260c05184610bae015260e05184610c3301525183610c590152518260e8015251816101120152f35b634e487b7160e01b600052604160045260246000fd5b600080fd5b604081019081106001600160401b038211176200014b57604052565b8051602091908281101562000221575090601f825111620001c05780825192015190808310620001b157501790565b82600019910360031b1b161790565b90604051809263305a27a960e01b82528060048301528251908160248401526000935b82851062000207575050604492506000838284010152601f80199101168101030190fd5b8481018201518686016044015293810193859350620001e3565b6001600160401b0381116200014b576000928354926001938481811c911680156200034a575b838210146200033657601f811162000300575b5081601f841160011462000299575092829391839286946200028d575b50501b916000199060031b1c191617905560ff90565b01519250388062000277565b919083601f1981168780528488209488905b88838310620002e55750505010620002cb575b505050811b01905560ff90565b015160001960f88460031b161c19169055388080620002be565b858701518855909601959485019487935090810190620002ab565b85805284601f848820920160051c820191601f860160051c015b8281106200032a5750506200025a565b8781550185906200031a565b634e487b7160e01b86526022600452602486fd5b90607f169062000247565b805160209081811015620003e35750601f825111620003825780825192015190808310620001b157501790565b90604051809263305a27a960e01b82528060048301528251908160248401526000935b828510620003c9575050604492506000838284010152601f80199101168101030190fd5b8481018201518686016044015293810193859350620003a5565b9192916001600160401b0381116200014b5760019182548381811c91168015620004f7575b82821014620004e157601f8111620004a8575b5080601f83116001146200045b5750819293946000926200044f575b5050600019600383901b1c191690821b17905560ff90565b01519050388062000437565b90601f198316958460005282600020926000905b888210620004905750508385969710620002cb57505050811b01905560ff90565b8087859682949686015181550195019301906200046f565b8360005283601f83600020920160051c820191601f850160051c015b828110620004d45750506200041b565b60008155018490620004c4565b634e487b7160e01b600052602260045260246000fd5b90607f16906200040856fe6040608081526004908136101561001557600080fd5b600091823560e01c80633486f857146104fe5780634e486aab146104a95780637621fd67146104465780637ff95ee8146101ef57806384b0196e146100d15763a2c8dd9e1461006357600080fd5b346100cd5760603660031901126100cd576001600160401b036024358181116100c957610093903690840161060c565b9190946044359182116100c6575091602094916100b66100bf943690840161060c565b93909235610cd5565b9051908152f35b80fd5b8480fd5b8280fd5b5090346100cd57826003193601126100cd5761010c7f0000000000000000000000000000000000000000000000000000000000000000610717565b926101367f000000000000000000000000000000000000000000000000000000000000000061081f565b90825192602092838501958587106001600160401b038811176101da57509280610190838896610183998b9996528686528151998a99600f60f81b8b5260e0868c015260e08b019061068d565b91898303908a015261068d565b924660608801523060808801528460a088015286840360c088015251928381520193925b8281106101c357505050500390f35b8351855286955093810193928101926001016101b4565b604190634e487b7160e01b6000525260246000fd5b5090346100cd5760e03660031901126100cd5760248035928035916001600160401b036044358181116103f057610229903690850161060c565b94909161023461063e565b9761023d610654565b9360a4359760018060a01b0394858a16998a81036104425760c43586811161043e576102a161029986610293898f6102a6978f8b61028261028b948d9b36910161060c565b9790958b610af8565b9236916108ef565b90610a3b565b919091610926565b610e0d565b8a51610763808201908282108883111761042b578f928092602092610ebc8339308152030191f5908115610421578a51928660208501931683528b808501528d60608501526060845260808401958487109087111761040f576020610343948f88958f868c9b9761033e978d9c99610332945260a087013784019160a08301938452845193849161066a565b010380855201836106f6565b610d61565b98169716968088036103f45750863b156103f0578551631b2ce7f360e11b815291168382015286818381838a5af180156103e6576103d1575b50908591853b156100cd57845193849263189acdbd60e31b84528301528183875af180156103c7576103b3575b6020838351908152f35b6103bd84916106b2565b6100cd57826103a9565b82513d86823e3d90fd5b6103de90969192966106b2565b94903861037c565b85513d89823e3d90fd5b8780fd5b8488856044938a51936312ae30e560e01b8552840152820152fd5b634e487b7160e01b8e5260418a52888efd5b8a513d8e823e3d90fd5b50634e487b7160e01b8f5260418b52898ffd5b8e80fd5b8d80fd5b5082346100c657826003193601126100c657602435906001600160401b0382116100c6576020610499856104918661048a6104833689840161060c565b36916108ef565b9035610a3b565b929092610926565b516001600160a01b039091168152f35b5091346100c65760a03660031901126100c657604435906001600160401b0382116100c657506020926104e26100bf923690830161060c565b6104ea61063e565b916104f3610654565b936024359035610af8565b50919034610608576080366003190112610608576001600160401b039183356024358481116100cd57610534903690870161060c565b91906044358681116100c95761054d903690890161060c565b9390966064359081116106045792610594859361059a93610483846102a16102998f9b8f610293908f9e8f9e61028b916105899136910161060c565b9490928a8c8a610cd5565b90610d61565b9581865192839283378101838152039082875af1903d156105fe573d906105c0826108d4565b916105cd855193846106f6565b825260203d92013e5b156105ef57516001600160a01b03909116815260209150f35b5163dc94ae4b60e01b81529050fd5b506105d6565b8580fd5b5080fd5b9181601f84011215610639578235916001600160401b038311610639576020838186019501011161063957565b600080fd5b606435906001600160a01b038216820361063957565b608435906001600160a01b038216820361063957565b60005b83811061067d5750506000910152565b818101518382015260200161066d565b906020916106a68151809281855285808601910161066a565b601f01601f1916010190565b6001600160401b0381116106c557604052565b634e487b7160e01b600052604160045260246000fd5b604081019081106001600160401b038211176106c557604052565b90601f801991011681019081106001600160401b038211176106c557604052565b60ff81146107555760ff811690601f82116107435760405191610739836106db565b8252602082015290565b604051632cd44ac360e21b8152600490fd5b506040516000805490600182811c90808416938415610815575b602094858410811461080157838752869493929181156107e157506001146107a3575b50506107a0925003826106f6565b90565b600080805285812095935091905b8183106107c95750506107a093508201013880610792565b855487840185015294850194869450918301916107b1565b9150506107a094925060ff191682840152151560051b8201013880610792565b634e487b7160e01b85526022600452602485fd5b91607f169161076f565b60ff81146108415760ff811690601f82116107435760405191610739836106db565b50604051600060019081549182811c908084169384156108ca575b602094858410811461080157838752869493929181156107e1575060011461088c5750506107a0925003826106f6565b600081815285812095935091905b8183106108b25750506107a093508201013880610792565b8554878401850152948501948694509183019161089a565b91607f169161085c565b6001600160401b0381116106c557601f01601f191660200190565b9291926108fb826108d4565b9161090960405193846106f6565b829481845281830111610639578281602093846000960137010152565b6005811015610a2557806109375750565b6001810361097f5760405162461bcd60e51b815260206004820152601860248201527745434453413a20696e76616c6964207369676e617475726560401b6044820152606490fd5b600281036109cc5760405162461bcd60e51b815260206004820152601f60248201527f45434453413a20696e76616c6964207369676e6174757265206c656e677468006044820152606490fd5b6003146109d557565b60405162461bcd60e51b815260206004820152602260248201527f45434453413a20696e76616c6964207369676e6174757265202773272076616c604482015261756560f01b6064820152608490fd5b634e487b7160e01b600052602160045260246000fd5b906041815114600014610a6957610a65916020820151906060604084015193015160001a90610a73565b9091565b5050600090600290565b9291906fa2a8918ca85bafe22016d0b997e4df60600160ff1b038311610aec5791608094939160ff602094604051948552168484015260408301526060820152600093849182805260015afa15610adf5781516001600160a01b03811615610ad9579190565b50600190565b50604051903d90823e3d90fd5b50505050600090600390565b939291610b0891959236916108ef565b602081519101206040519460208601947f4f2bfcc23c1adbe54973f469f111f1848a62d32cc4a906c7a5ced17481b366ea865260408701526060860152608085015260018060a01b0380921660a08501521660c083015260c0825260e08201918083106001600160401b038411176106c5576107a0926040525190205b604290610b90610bab565b906040519161190160f01b8352600283015260228201522090565b307f00000000000000000000000000000000000000000000000000000000000000006001600160a01b03161480610cac575b15610c06577f000000000000000000000000000000000000000000000000000000000000000090565b60405160208101907f8b73c3c69bb8fe3d512ecc4cf759cc79239f7b179b0ffacaa9a75d522b39400f82527f000000000000000000000000000000000000000000000000000000000000000060408201527f000000000000000000000000000000000000000000000000000000000000000060608201524660808201523060a082015260a0815260c081018181106001600160401b038211176106c55760405251902090565b507f00000000000000000000000000000000000000000000000000000000000000004614610bdd565b9290610ce690610cf59336916108ef565b602081519101209336916108ef565b602081519101206040519260208401927f11ebd6670048529a84d03c14cb6bf8539a7ce6288dd624a22bb7111cacc9358e84526040850152606084015260808301526080825260a08201918083106001600160401b038411176106c5576107a092604052519020610b85565b90805115610dc9576020815191016000f5906001600160a01b03821615610d8457565b60405162461bcd60e51b815260206004820152601960248201527f437265617465323a204661696c6564206f6e206465706c6f79000000000000006044820152606490fd5b606460405162461bcd60e51b815260206004820152602060248201527f437265617465323a2062797465636f6465206c656e677468206973207a65726f6044820152fd5b60018060a01b03168160601c14908115610ea3575b5015610e2a57565b60405162461bcd60e51b815260206004820152604560248201527f496e76616c69642073616c74202d206669727374203230206279746573206f6660448201527f207468652073616c74206d757374206d617463682063616c6c696e67206164646064820152643932b9b99760d91b608482015260a490fd5b6bffffffffffffffffffffffff191615905038610e2256fe60c03461008b57601f61076338819003918201601f19168301916001600160401b038311848410176100905780849260209460405283398101031261008b57516001600160a01b038116810361008b573060805260a0526040516106bc90816100a782396080518181816058015281816101280152610394015260a05181818161016d01526103da0152f35b600080fd5b634e487b7160e01b600052604160045260246000fdfe608060408181526004918236101561001657600080fd5b600090813560e01c9081633659cfe61461036a575080634f1ef286146100ad576352d1902d1461004557600080fd5b346100aa57806003193601126100aa57507f00000000000000000000000000000000000000000000000000000000000000006001600160a01b0316300361009d57602090516000805160206106678339815191528152f35b51635e4c25f160e01b8152fd5b80fd5b509080600319360112610366576100c2610587565b9060243567ffffffffffffffff811161036257366023820112156103625780850135906100ee826105da565b6100fa845191826105a2565b8281526020928382019236602483830101116103035781889260248793018637830101526001600160a01b037f00000000000000000000000000000000000000000000000000000000000000008116903082146103525760008051602061066783398151915291818354160361034257807f000000000000000000000000000000000000000000000000000000000000000016330361030e577f4910fdfa16fed3260ed0e7147f7cc6da11a60208b5b9406d12a635614ffd91435460ff16156101d1575050505050506101ce9192506105f6565b80f35b86979597169087516352d1902d60e01b815285818b81865afa8791816102db575b5061020757885163e5ec176960e01b81528a90fd5b989293949698979597036102cc5761021e886105f6565b8451907fbc7cd75a20ee27fd9adebab32041f755214dbc6bffa90cc0225b39da2e5c2d3b8880a28251158015906102c4575b610260575b505050505050905080f35b873b156102b857505093809581926102a19651915af4903d156102ae573d61029361028a826105da565b925192836105a2565b81528481933d92013e61063d565b5080388080808080610255565b506060915061063d565b63369891e760e01b8152fd5b506001610250565b5083516308373ebf60e41b8152fd5b9091508681813d8311610307575b6102f381836105a2565b81010312610303575190386101f2565b8780fd5b503d6102e9565b855162461bcd60e51b8152808a01869052600e60248201526d1b9bdd08185d5d1a1bdc9a5e995960921b6044820152606490fd5b85516364cd8d1960e01b81528990fd5b8551631932df4560e01b81528990fd5b8380fd5b5080fd5b91929050346105835760208060031936011261036257610388610587565b926001600160a01b03907f0000000000000000000000000000000000000000000000000000000000000000821690308214610575575060008051602061066783398151915290828254160361056557817f0000000000000000000000000000000000000000000000000000000000000000163303610531578351908382019282841067ffffffffffffffff85111761051e578386528783527f4910fdfa16fed3260ed0e7147f7cc6da11a60208b5b9406d12a635614ffd91435460ff161561045b575050505050506101ce9192506105f6565b86979597169087516352d1902d60e01b815285818b81865afa8791816104ef575b5061049157885163e5ec176960e01b81528a90fd5b989293949698979597036102cc576104a8886105f6565b8451907fbc7cd75a20ee27fd9adebab32041f755214dbc6bffa90cc0225b39da2e5c2d3b8880a28251158015906104e85761026057505050505050905080f35b5086610250565b9091508681813d8311610517575b61050781836105a2565b810103126103035751903861047c565b503d6104fd565b634e487b7160e01b885260418952602488fd5b835162461bcd60e51b8152808801849052600e60248201526d1b9bdd08185d5d1a1bdc9a5e995960921b6044820152606490fd5b83516364cd8d1960e01b81528790fd5b631932df4560e01b81528790fd5b8280fd5b600435906001600160a01b038216820361059d57565b600080fd5b90601f8019910116810190811067ffffffffffffffff8211176105c457604052565b634e487b7160e01b600052604160045260246000fd5b67ffffffffffffffff81116105c457601f01601f191660200190565b803b1561062b5760008051602061066783398151915280546001600160a01b0319166001600160a01b03909216919091179055565b60405163529880eb60e01b8152600490fd5b156106455790565b80511561065457805190602001fd5b6040516350a28c9b60e11b8152600490fdfe360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbca264697066735822122045956a6c2f86f27f4001483acf6a61195441ac40433c504ce3ac6d6bef8b1b1864736f6c63430008110033a2646970667358221220114f022292a418cbe0db59aa75af37529b0c83b91c282cd1b5df40001ca338e364736f6c63430008110033", + "proxyDeployerAddress": "0x6d694a5394BFe227CA2321669BA43221e9Fc971D", + "proxyDeployerCreationCode": "0x61016080604052346200016057620000178162000165565b60178152602081017f4e6577466163746f727950726f78794465706c6f796572000000000000000000815260405191620000518362000165565b6001835260208301603160f81b81526200006b8262000181565b926101209384526200007d8562000354565b92610140938452519020938460e05251902091610100938385524660a0526040519360208501917f8b73c3c69bb8fe3d512ecc4cf759cc79239f7b179b0ffacaa9a75d522b39400f8352604086015260608501524660808501523060a085015260a0845260c084019380851060018060401b038611176200014a57846040525190206080523060c05261143f938462000502853960805184610bb5015260a05184610c80015260c05184610b7f015260e05184610c0401525183610c2a01525182606101525181608b0152f35b634e487b7160e01b600052604160045260246000fd5b600080fd5b604081019081106001600160401b038211176200014a57604052565b8051602091908281101562000220575090601f825111620001bf5780825192015190808310620001b057501790565b82600019910360031b1b161790565b90604051809263305a27a960e01b82528060048301528251908160248401526000935b82851062000206575050604492506000838284010152601f80199101168101030190fd5b8481018201518686016044015293810193859350620001e2565b6001600160401b0381116200014a576000928354926001938481811c9116801562000349575b838210146200033557601f8111620002ff575b5081601f841160011462000298575092829391839286946200028c575b50501b916000199060031b1c191617905560ff90565b01519250388062000276565b919083601f1981168780528488209488905b88838310620002e45750505010620002ca575b505050811b01905560ff90565b015160001960f88460031b161c19169055388080620002bd565b858701518855909601959485019487935090810190620002aa565b85805284601f848820920160051c820191601f860160051c015b8281106200032957505062000259565b87815501859062000319565b634e487b7160e01b86526022600452602486fd5b90607f169062000246565b805160209081811015620003e25750601f825111620003815780825192015190808310620001b057501790565b90604051809263305a27a960e01b82528060048301528251908160248401526000935b828510620003c8575050604492506000838284010152601f80199101168101030190fd5b8481018201518686016044015293810193859350620003a4565b9192916001600160401b0381116200014a5760019182548381811c91168015620004f6575b82821014620004e057601f8111620004a7575b5080601f83116001146200045a5750819293946000926200044e575b5050600019600383901b1c191690821b17905560ff90565b01519050388062000436565b90601f198316958460005282600020926000905b8882106200048f5750508385969710620002ca57505050811b01905560ff90565b8087859682949686015181550195019301906200046e565b8360005283601f83600020920160051c820191601f850160051c015b828110620004d35750506200041a565b60008155018490620004c3565b634e487b7160e01b600052602260045260246000fd5b90607f16906200040756fe60406080815260048036101561001457600080fd5b600091823560e01c806315d06c3114610544578063409bdf89146104e8578063825748bc1461016c576384b0196e1461004c57600080fd5b346101685782600319360112610168576100857f00000000000000000000000000000000000000000000000000000000000000006106f9565b926100af7f0000000000000000000000000000000000000000000000000000000000000000610801565b90825192602092838501958587106001600160401b03881117610153575092806101098388966100fc998b9996528686528151998a99600f60f81b8b5260e0868c015260e08b019061066f565b91898303908a015261066f565b924660608801523060808801528460a088015286840360c088015251928381520193925b82811061013c57505050500390f35b83518552869550938101939281019260010161012d565b604190634e487b7160e01b6000525260246000fd5b8280fd5b50346101685760e0366003190112610168578135926001600160401b0392604435848111610168576101a190369083016105ee565b9190946101ac610620565b956101b5610636565b9060a4359260018060a01b0391828516968786036104e45760c4358381116104e0578c859136908a01906101e8916105ee565b916024998986888d356101fa95610ace565b913690610206926108b6565b61020f91610a11565b610218906108fc565b168c60601c1480156104c9575b156104535789519b8c6107638082019182108683111761044157908e91610ca7833930815260209e8f910301908bf590811561043757908c91858c51938401921682528b808401528a60608401526060835260808301948386109086111761042557918a8e926102b26102be958f8990528060a0860198893784019160a08301938452845193849161064c565b010380855201836106d8565b8151156103e557908291853591519089f5169788156103a35781168089036103885750873b15610384578651631b2ce7f360e11b815291168382015284818381838b5af1801561037a57610367575b50853b1561036357908391855193849263189acdbd60e31b84528301528183885af1801561035957610342575b505051908152f35b61034c8291610694565b610356578061033a565b80fd5b83513d84823e3d90fd5b8380fd5b61037390949194610694565b923861030d565b86513d87823e3d90fd5b8580fd5b8489856044938b51936312ae30e560e01b8552840152820152fd5b875162461bcd60e51b81528086018b90526019818601527f437265617465323a204661696c6564206f6e206465706c6f79000000000000006044820152606490fd5b6064868c87818d519362461bcd60e51b85528401528201527f437265617465323a2062797465636f6465206c656e677468206973207a65726f6044820152fd5b634e487b7160e01b8b5260418952878bfd5b8a513d8b823e3d90fd5b634e487b7160e01b8c5260418a52888cfd5b895162461bcd60e51b81526020818901526045818801527f496e76616c69642073616c74202d206669727374203230206279746573206f6660448201527f207468652073616c74206d757374206d617463682063616c6c696e67206164646064820152643932b9b99760d91b608482015260a490fd5b506bffffffffffffffffffffffff198c1615610225565b8980fd5b8880fd5b5082346103565760a036600319011261035657604435906001600160401b038211610356575060209261052161053d92369083016105ee565b610529610620565b91610532610636565b936024359035610ace565b9051908152f35b509190346105ea5760c03660031901126105ea576001600160401b03916044358381116105ea5761057890369084016105ee565b610583949194610620565b9161058c610636565b9360a4359182116103565760206105da896105d28a6105cc8b6105c48c8c8c6105b7368e87016105ee565b9790956024359035610ace565b9236916108b6565b90610a11565b9290926108fc565b516001600160a01b039091168152f35b5080fd5b9181601f8401121561061b578235916001600160401b03831161061b576020838186019501011161061b57565b600080fd5b606435906001600160a01b038216820361061b57565b608435906001600160a01b038216820361061b57565b60005b83811061065f5750506000910152565b818101518382015260200161064f565b906020916106888151809281855285808601910161064c565b601f01601f1916010190565b6001600160401b0381116106a757604052565b634e487b7160e01b600052604160045260246000fd5b604081019081106001600160401b038211176106a757604052565b90601f801991011681019081106001600160401b038211176106a757604052565b60ff81146107375760ff811690601f8211610725576040519161071b836106bd565b8252602082015290565b604051632cd44ac360e21b8152600490fd5b506040516000805490600182811c908084169384156107f7575b60209485841081146107e357838752869493929181156107c35750600114610785575b5050610782925003826106d8565b90565b600080805285812095935091905b8183106107ab57505061078293508201013880610774565b85548784018501529485019486945091830191610793565b91505061078294925060ff191682840152151560051b8201013880610774565b634e487b7160e01b85526022600452602485fd5b91607f1691610751565b60ff81146108235760ff811690601f8211610725576040519161071b836106bd565b50604051600060019081549182811c908084169384156108ac575b60209485841081146107e357838752869493929181156107c3575060011461086e575050610782925003826106d8565b600081815285812095935091905b81831061089457505061078293508201013880610774565b8554878401850152948501948694509183019161087c565b91607f169161083e565b9291926001600160401b0382116106a757604051916108df601f8201601f1916602001846106d8565b82948184528183011161061b578281602093846000960137010152565b60058110156109fb578061090d5750565b600181036109555760405162461bcd60e51b815260206004820152601860248201527745434453413a20696e76616c6964207369676e617475726560401b6044820152606490fd5b600281036109a25760405162461bcd60e51b815260206004820152601f60248201527f45434453413a20696e76616c6964207369676e6174757265206c656e677468006044820152606490fd5b6003146109ab57565b60405162461bcd60e51b815260206004820152602260248201527f45434453413a20696e76616c6964207369676e6174757265202773272076616c604482015261756560f01b6064820152608490fd5b634e487b7160e01b600052602160045260246000fd5b906041815114600014610a3f57610a3b916020820151906060604084015193015160001a90610a49565b9091565b5050600090600290565b9291906fa2a8918ca85bafe22016d0b997e4df60600160ff1b038311610ac25791608094939160ff602094604051948552168484015260408301526060820152600093849182805260015afa15610ab55781516001600160a01b03811615610aaf579190565b50600190565b50604051903d90823e3d90fd5b50505050600090600390565b939291610ade91959236916108b6565b602081519101206040519460208601947f4f2bfcc23c1adbe54973f469f111f1848a62d32cc4a906c7a5ced17481b366ea865260408701526060860152608085015260018060a01b0380921660a08501521660c083015260c0825260e08201918083106001600160401b038411176106a757604292604052519020610b61610b7c565b906040519161190160f01b8352600283015260228201522090565b307f00000000000000000000000000000000000000000000000000000000000000006001600160a01b03161480610c7d575b15610bd7577f000000000000000000000000000000000000000000000000000000000000000090565b60405160208101907f8b73c3c69bb8fe3d512ecc4cf759cc79239f7b179b0ffacaa9a75d522b39400f82527f000000000000000000000000000000000000000000000000000000000000000060408201527f000000000000000000000000000000000000000000000000000000000000000060608201524660808201523060a082015260a0815260c081018181106001600160401b038211176106a75760405251902090565b507f00000000000000000000000000000000000000000000000000000000000000004614610bae56fe60c03461008b57601f61076338819003918201601f19168301916001600160401b038311848410176100905780849260209460405283398101031261008b57516001600160a01b038116810361008b573060805260a0526040516106bc90816100a782396080518181816058015281816101280152610394015260a05181818161016d01526103da0152f35b600080fd5b634e487b7160e01b600052604160045260246000fdfe608060408181526004918236101561001657600080fd5b600090813560e01c9081633659cfe61461036a575080634f1ef286146100ad576352d1902d1461004557600080fd5b346100aa57806003193601126100aa57507f00000000000000000000000000000000000000000000000000000000000000006001600160a01b0316300361009d57602090516000805160206106678339815191528152f35b51635e4c25f160e01b8152fd5b80fd5b509080600319360112610366576100c2610587565b9060243567ffffffffffffffff811161036257366023820112156103625780850135906100ee826105da565b6100fa845191826105a2565b8281526020928382019236602483830101116103035781889260248793018637830101526001600160a01b037f00000000000000000000000000000000000000000000000000000000000000008116903082146103525760008051602061066783398151915291818354160361034257807f000000000000000000000000000000000000000000000000000000000000000016330361030e577f4910fdfa16fed3260ed0e7147f7cc6da11a60208b5b9406d12a635614ffd91435460ff16156101d1575050505050506101ce9192506105f6565b80f35b86979597169087516352d1902d60e01b815285818b81865afa8791816102db575b5061020757885163e5ec176960e01b81528a90fd5b989293949698979597036102cc5761021e886105f6565b8451907fbc7cd75a20ee27fd9adebab32041f755214dbc6bffa90cc0225b39da2e5c2d3b8880a28251158015906102c4575b610260575b505050505050905080f35b873b156102b857505093809581926102a19651915af4903d156102ae573d61029361028a826105da565b925192836105a2565b81528481933d92013e61063d565b5080388080808080610255565b506060915061063d565b63369891e760e01b8152fd5b506001610250565b5083516308373ebf60e41b8152fd5b9091508681813d8311610307575b6102f381836105a2565b81010312610303575190386101f2565b8780fd5b503d6102e9565b855162461bcd60e51b8152808a01869052600e60248201526d1b9bdd08185d5d1a1bdc9a5e995960921b6044820152606490fd5b85516364cd8d1960e01b81528990fd5b8551631932df4560e01b81528990fd5b8380fd5b5080fd5b91929050346105835760208060031936011261036257610388610587565b926001600160a01b03907f0000000000000000000000000000000000000000000000000000000000000000821690308214610575575060008051602061066783398151915290828254160361056557817f0000000000000000000000000000000000000000000000000000000000000000163303610531578351908382019282841067ffffffffffffffff85111761051e578386528783527f4910fdfa16fed3260ed0e7147f7cc6da11a60208b5b9406d12a635614ffd91435460ff161561045b575050505050506101ce9192506105f6565b86979597169087516352d1902d60e01b815285818b81865afa8791816104ef575b5061049157885163e5ec176960e01b81528a90fd5b989293949698979597036102cc576104a8886105f6565b8451907fbc7cd75a20ee27fd9adebab32041f755214dbc6bffa90cc0225b39da2e5c2d3b8880a28251158015906104e85761026057505050505050905080f35b5086610250565b9091508681813d8311610517575b61050781836105a2565b810103126103035751903861047c565b503d6104fd565b634e487b7160e01b885260418952602488fd5b835162461bcd60e51b8152808801849052600e60248201526d1b9bdd08185d5d1a1bdc9a5e995960921b6044820152606490fd5b83516364cd8d1960e01b81528790fd5b631932df4560e01b81528790fd5b8280fd5b600435906001600160a01b038216820361059d57565b600080fd5b90601f8019910116810190811067ffffffffffffffff8211176105c457604052565b634e487b7160e01b600052604160045260246000fd5b67ffffffffffffffff81116105c457601f01601f191660200190565b803b1561062b5760008051602061066783398151915280546001600160a01b0319166001600160a01b03909216919091179055565b60405163529880eb60e01b8152600490fd5b156106455790565b80511561065457805190602001fd5b6040516350a28c9b60e11b8152600490fdfe360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbca264697066735822122045956a6c2f86f27f4001483acf6a61195441ac40433c504ce3ac6d6bef8b1b1864736f6c63430008110033a2646970667358221220dabba1dcd032491f8a97dc59455163d769d7f2c0092154bc5aa3845d80c470a464736f6c63430008110033", "proxyDeployerSalt": "0x0000000000000000000000000000000000000000668d7f9ec18e35000dbaba0e", - "proxySalt": "0xe9a904b6f24b6191eb1ff70510d198d9fa83709b7c57b7b4dd410fd644d4d20d", - "proxyShimSalt": "0x9444390c01dd5b7249e53fac31290f7dff53450d0000000000000000000000c8" + "proxySalt": "0x0ab5974fbf52091e866576dd1d84bf3fba30cb2996f12a729b7ff2a2238a3a8f", + "proxyShimSalt": "0x4f9991c82c76ae04cc39f23ab909aa919886ba120000000000000000000000c8" } \ No newline at end of file diff --git a/deterministicConfig/premintExecutorProxy/signatures.json b/deterministicConfig/premintExecutorProxy/signatures.json new file mode 100644 index 000000000..82b731cea --- /dev/null +++ b/deterministicConfig/premintExecutorProxy/signatures.json @@ -0,0 +1,3 @@ +{ + "999": "0x18ec8191bac7a5d1751104f4ef1b817df5b307c9ce0d4ea68af4fc00a429cf8c30483b3cb0278e8cf28a9c1af97f9a9f59bb05863aeb5adc0b7897e604afec931c" +} \ No newline at end of file diff --git a/src/deployment/DeterministicDeployerScript.sol b/src/deployment/DeterministicDeployerScript.sol index e313b7fff..feb047fd0 100644 --- a/src/deployment/DeterministicDeployerScript.sol +++ b/src/deployment/DeterministicDeployerScript.sol @@ -99,62 +99,79 @@ contract DeterministicDeployerScript is Script { signature = signatures.readBytes(string.concat(".", string.concat(vm.toString(chain)))); } - function getDeterministicDeploymentParams( - address deployerAddress, - bytes memory proxyCreationCode, - uint256 proxyShimSaltSuffix - ) internal returns (DeterministicParams memory) { - // 1. Get salt with first bytes that match address, and resulting determinisitic factory proxy deployer address + function getProxyDeployerParams() internal returns (bytes32 proxyDeployerSalt, bytes memory proxyDeployerCreationCode, address proxyDeployerAddress) { + proxyDeployerSalt = ZoraDeployerUtils.FACTORY_DEPLOYER_DEPLOYMENT_SALT; - // replace first 20 characters of salt with deployer address, so that the salt can be used with - // ImmutableCreate2Factory.safeCreate2 when called by this deployer's account: - bytes32 proxyDeployerSalt = ZoraDeployerUtils.FACTORY_DEPLOYER_DEPLOYMENT_SALT; - - bytes memory proxyDeployerCreationCode = type(DeterministicProxyDeployer).creationCode; + proxyDeployerCreationCode = type(DeterministicProxyDeployer).creationCode; // we can know deterministically what the address of the new factory proxy deployer will be, given it's deployed from with the salt and init code, // from the ImmutableCreate2Factory - address proxyDeployerAddress = ZoraDeployerUtils.IMMUTABLE_CREATE2_FACTORY.findCreate2Address(proxyDeployerSalt, proxyDeployerCreationCode); - - console2.log("expected factory deployer address:", proxyDeployerAddress); - - // 2. Get random proxy shim salt, and resulting deterministic address + proxyDeployerAddress = ZoraDeployerUtils.IMMUTABLE_CREATE2_FACTORY.findCreate2Address(proxyDeployerSalt, proxyDeployerCreationCode); + } - // Proxy shim will be initialized with the factory deployer address as the owner, allowing only the factory deployer to upgrade the proxy, - // to the eventual factory implementation - bytes memory proxyShimInitCode = abi.encodePacked(type(ProxyShim).creationCode, abi.encode(proxyDeployerAddress)); + function getProxyShimParams( + address proxyDeployerAddress, + address deployerAddress, + uint256 proxyShimSaltSuffix + ) internal returns (bytes memory proxyShimInitCode, bytes32 proxyShimSalt, address proxyShimAddress) { + proxyShimInitCode = abi.encodePacked(type(ProxyShim).creationCode, abi.encode(proxyDeployerAddress)); // create any arbitrary salt for proxy shim (this can be anything, we just care about the resulting address) - bytes32 proxyShimSalt = saltWithAddressInFirst20Bytes(deployerAddress, proxyShimSaltSuffix); + proxyShimSalt = saltWithAddressInFirst20Bytes(deployerAddress, proxyShimSaltSuffix); // now get deterministic proxy shim address based on salt, deployer address, which will be DeterministicProxyDeployer address and init code - address proxyShimAddress = Create2.computeAddress(proxyShimSalt, keccak256(proxyShimInitCode), proxyDeployerAddress); - - console2.log("proxy shim address:"); - console2.log(proxyShimAddress); - - // 3. Mine for a salt that can be used to deterministically create the factory proxy, given the proxy shim address, which is passed as the - // constructor argument, and the deployer, which is the new factory proxy deployer, which we know the address of deterministically + proxyShimAddress = Create2.computeAddress(proxyShimSalt, keccak256(proxyShimInitCode), proxyDeployerAddress); + } + function getProxyParams( + bytes memory proxyCreationCode, + address proxyShimAddress, + address proxyDeployerAddress + ) internal returns (bytes32 proxySalt, address deterministicProxyAddress) { bytes memory factoryProxyInitCode = abi.encodePacked(proxyCreationCode, abi.encode(proxyShimAddress, "")); bytes32 creationCodeHash = keccak256(factoryProxyInitCode); - console.log("init code hash: ", LibString.toHexStringNoPrefix(uint256(creationCodeHash), 32)); + (proxySalt, deterministicProxyAddress) = mineSalt(proxyDeployerAddress, creationCodeHash, "777777"); + } - (bytes32 proxySalt, address deterministicProxyAddress) = mineSalt(proxyDeployerAddress, creationCodeHash, "777777"); + function getDeterministicDeploymentParams( + address deployerAddress, + bytes memory proxyCreationCode, + uint256 proxyShimSaltSuffix + ) internal returns (DeterministicParams memory) { + // 1. Get salt with first bytes that match address, and resulting determinisitic factory proxy deployer address + (bytes32 proxyDeployerSalt, bytes memory proxyDeployerCreationCode, address proxyDeployerAddress) = getProxyDeployerParams(); + // replace first 20 characters of salt with deployer address, so that the salt can be used with + // ImmutableCreate2Factory.safeCreate2 when called by this deployer's account: - DeterministicParams memory result = DeterministicParams({ - proxyDeployerCreationCode: proxyDeployerCreationCode, - proxyCreationCode: proxyCreationCode, - deployerAddress: deployerAddress, + // 2. Get random proxy shim salt, and resulting deterministic address + // Proxy shim will be initialized with the factory deployer address as the owner, allowing only the factory deployer to upgrade the proxy, + // to the eventual factory implementation + (bytes memory proxyShimInitCode, bytes32 proxyShimSalt, address proxyShimAddress) = getProxyShimParams({ proxyDeployerAddress: proxyDeployerAddress, - proxyDeployerSalt: proxyDeployerSalt, - proxyShimSalt: proxyShimSalt, - proxySalt: proxySalt, - deterministicProxyAddress: deterministicProxyAddress + deployerAddress: deployerAddress, + proxyShimSaltSuffix: proxyShimSaltSuffix }); - return result; + // 3. Mine for a salt that can be used to deterministically create the factory proxy, given the proxy shim address, which is passed as the + // constructor argument, and the deployer, which is the new factory proxy deployer, which we know the address of deterministically + (bytes32 proxySalt, address deterministicProxyAddress) = getProxyParams({ + proxyCreationCode: proxyCreationCode, + proxyShimAddress: proxyShimAddress, + proxyDeployerAddress: proxyDeployerAddress + }); + + return + DeterministicParams({ + proxyDeployerCreationCode: proxyDeployerCreationCode, + proxyCreationCode: proxyCreationCode, + deployerAddress: deployerAddress, + proxyDeployerAddress: proxyDeployerAddress, + proxyDeployerSalt: proxyDeployerSalt, + proxyShimSalt: proxyShimSalt, + proxySalt: proxySalt, + deterministicProxyAddress: deterministicProxyAddress + }); } error MismatchedAddress(address expected, address actual); diff --git a/test/deployer/NewFactoryProxyDeployer.t.sol b/test/deployer/NewFactoryProxyDeployer.t.sol index ab260b2be..8094c950d 100644 --- a/test/deployer/NewFactoryProxyDeployer.t.sol +++ b/test/deployer/NewFactoryProxyDeployer.t.sol @@ -10,127 +10,77 @@ import {UpgradeGate} from "../../src/upgrades/UpgradeGate.sol"; import {Deployment, ChainConfig} from "../../src/deployment/DeploymentConfig.sol"; import {IMinter1155} from "../../src/interfaces/IMinter1155.sol"; import {Create2} from "@openzeppelin/contracts/utils/Create2.sol"; +import {DeterministicDeployerScript, DeterministicParams} from "../../src/deployment/DeterministicDeployerScript.sol"; -contract DeterministicProxyDeployerTest is Test { +contract DeterministicProxyDeployerTest is DeterministicDeployerScript, Test { using stdJson for string; // the values in this test can be determined by running the script GetDeterministicParam.s.sol, // and copying the output values here. - bytes32 DeterministicProxyDeployerCreationSalt = bytes32(0x0000000000000000000000000000000000000000668d7f9eb18e35000dbaba0e); - bytes32 proxyShimSalt = bytes32(0xf69fec6d858c77e969509843852178bd24cad2b6000000000000000000000000); - bytes32 factoryProxySalt = bytes32(0xe06d3223ede55655f68ce124bc16c9c311a20c31806ca2b04056664a574e2f1d); - - function setUp() public { - string memory deployConfig = vm.readFile(string.concat(string.concat(vm.projectRoot(), "/deterministicConfig/factoryProxy", "/params.json"))); - - DeterministicProxyDeployerCreationSalt = deployConfig.readBytes32(".proxyDeployerSalt"); - proxyShimSalt = deployConfig.readBytes32(".proxyShimSalt"); - factoryProxySalt = deployConfig.readBytes32(".proxyDeployerSalt"); + function _deployKnownZoraFactoryProxy(bytes32 salt) internal returns (DeterministicProxyDeployer) { + // create new factory deployer using ImmutableCreate2Factory + return DeterministicProxyDeployer(ZoraDeployerUtils.IMMUTABLE_CREATE2_FACTORY.safeCreate2(salt, type(DeterministicProxyDeployer).creationCode)); } - function _deployKnownZoraFactoryProxy() internal returns (DeterministicProxyDeployer factoryProxyDeployer) { - bytes memory DeterministicProxyDeployerInitCode = type(DeterministicProxyDeployer).creationCode; - - address computedFactoryDeployerAddress = ZoraDeployerUtils.IMMUTABLE_CREATE2_FACTORY.findCreate2Address( - DeterministicProxyDeployerCreationSalt, - DeterministicProxyDeployerInitCode - ); - - address expectedFactoryDeployerAddress = 0x9868a3FFe92C44c4Ce1db8033C6f55a674D511D8; - assertEq(computedFactoryDeployerAddress, expectedFactoryDeployerAddress, "deterministic factory deployer address wrong"); + function create1155FactoryImpl() internal returns (address) { + address mintFeeRecipient = makeAddr("mintFeeRecipient"); + address factoryOwner = makeAddr("factorOwner"); + address protocolRewards = makeAddr("protocolRewards"); - address computedFactoryProxyAddress = ZoraDeployerUtils.deterministicFactoryProxyAddress({ - proxyShimSalt: proxyShimSalt, - factoryProxySalt: factoryProxySalt, - proxyDeployerAddress: computedFactoryDeployerAddress + (address factoryImplAddress, ) = ZoraDeployerUtils.deployNew1155AndFactoryImpl({ + factoryProxyAddress: address(0), + mintFeeRecipient: mintFeeRecipient, + protocolRewards: protocolRewards, + merkleMinter: IMinter1155(address(0)), + redeemMinterFactory: IMinter1155(address(0)), + fixedPriceMinter: IMinter1155(address(0)) }); - address expectedFactoryProxyAddress = 0x77777718F04F2f9d9082a5AC853cBA682b19fB48; - assertEq(computedFactoryProxyAddress, expectedFactoryProxyAddress, "deterministic factory proxy address wrong"); - - // create new factory deployer using ImmutableCreate2Factory - address DeterministicProxyDeployerAddress = ZoraDeployerUtils.IMMUTABLE_CREATE2_FACTORY.safeCreate2( - DeterministicProxyDeployerCreationSalt, - DeterministicProxyDeployerInitCode - ); - - assertEq(DeterministicProxyDeployerAddress, computedFactoryDeployerAddress, "factory deployer address wrong"); - - assertEq(computedFactoryDeployerAddress, address(0x77777718F04F2f9d9082a5AC853cBA682b19fB48)); - - // create factory proxy at deterministic address: - factoryProxyDeployer = DeterministicProxyDeployer(DeterministicProxyDeployerAddress); + return factoryImplAddress; } - function test_proxyCanByDeployedAtDesiredAddress(uint32 nonce) external { + function test_proxyCanByDeployedAtDesiredAddress(bytes32 proxySalt) external { vm.createSelectFork("zora_goerli", 1252119); // ensure nonce is greater than current account's nonce (address deployerAddress, uint256 deployerPrivateKey) = makeAddrAndKey("deployer"); - - // address expectedFactoryDeployerAddress = 0x9868a3FFe92C44c4Ce1db8033C6f55a674D511D8; - address expectedFactoryProxyAddress = 0x77777718F04F2f9d9082a5AC853cBA682b19fB48; + bytes32 proxyDeployerSalt = ZoraDeployerUtils.FACTORY_DEPLOYER_DEPLOYMENT_SALT; // now we can create the implementation, pointing it to the expected deterministic address: - address mintFeeRecipient = makeAddr("mintFeeRecipient"); - address factoryOwner = makeAddr("factorOwner"); - address protocolRewards = makeAddr("protocolRewards"); + bytes32 proxyShimSalt = saltWithAddressInFirst20Bytes(deployerAddress, 10); // 1. Create implementation contracts based on deterministic factory proxy address // create 1155 and factory impl, we can know the deterministic factor proxy address ahead of time: - (address factoryImplAddress, ) = ZoraDeployerUtils.deployNew1155AndFactoryImpl({ - factoryProxyAddress: expectedFactoryProxyAddress, - mintFeeRecipient: mintFeeRecipient, - protocolRewards: protocolRewards, - merkleMinter: IMinter1155(address(0)), - redeemMinterFactory: IMinter1155(address(0)), - fixedPriceMinter: IMinter1155(address(0)) - }); - - vm.assume(nonce > vm.getNonce(deployerAddress)); - // we set the nonce to a random value, to prove this doesn't affect the deterministic addrss - vm.setNonce(deployerAddress, nonce); + address factoryImplAddress = create1155FactoryImpl(); // 2. Create factory deployer at deterministic address - DeterministicProxyDeployer factoryProxyDeployer = _deployKnownZoraFactoryProxy(); - - // // try to create and initialize factory proxy as another account, it should revert, as only original deployer should be - // // able to call this: - // vm.prank(makeAddr("other")); - // vm.expectRevert(); - // factoryProxyDeployer.createAndInitializeNewFactoryProxyDeterministic( - // proxyShimSalt, - // factoryProxySalt, - // deterministicFactoryProxyAddress, - // factoryImplAddress, - // factoryOwner - // ); + DeterministicProxyDeployer factoryProxyDeployer = _deployKnownZoraFactoryProxy(proxyDeployerSalt); bytes memory factoryProxyCreationCode = type(Zora1155Factory).creationCode; + address mintFeeRecipient = makeAddr("mintFeeRecipient "); bytes32 digest = factoryProxyDeployer.hashedDigestFactoryProxy( proxyShimSalt, - factoryProxySalt, + proxySalt, factoryProxyCreationCode, factoryImplAddress, - factoryOwner + mintFeeRecipient ); // sign the message - (uint8 v, bytes32 r, bytes32 s) = vm.sign(deployerPrivateKey, digest); + bytes memory signature = signAndMakeBytes(digest, deployerPrivateKey); - // combine into a single bytes array - bytes memory signature = abi.encodePacked(r, s, v); + address expectedFactoryProxyAddress = ZoraDeployerUtils.deterministicFactoryProxyAddress(proxyShimSalt, proxySalt, address(factoryProxyDeployer)); // now do it as original deployer, it should succeed: address factoryProxyAddress = factoryProxyDeployer.createFactoryProxyDeterministic( proxyShimSalt, - factoryProxySalt, + proxySalt, factoryProxyCreationCode, expectedFactoryProxyAddress, factoryImplAddress, - factoryOwner, + mintFeeRecipient, signature ); @@ -139,6 +89,13 @@ contract DeterministicProxyDeployerTest is Test { assertEq(factoryProxyAddress, expectedFactoryProxyAddress, "factory proxy address wrong"); } + function signAndMakeBytes(bytes32 digest, uint256 privateKey) internal returns (bytes memory) { + (uint8 v, bytes32 r, bytes32 s) = vm.sign(privateKey, digest); + + // combine into a single bytes array + return abi.encodePacked(r, s, v); + } + function test_genericContractCanByDeployedAtDesiredAddress(uint32 nonce) external { vm.createSelectFork("zora_goerli", 1252119); @@ -148,7 +105,7 @@ contract DeterministicProxyDeployerTest is Test { // we set the nonce to a random value, to prove this doesn't affect the deterministic addrss vm.setNonce(deployerAddress, nonce); - DeterministicProxyDeployer factoryProxyDeployer = _deployKnownZoraFactoryProxy(); + DeterministicProxyDeployer factoryProxyDeployer = _deployKnownZoraFactoryProxy(bytes32(0)); address gateAdmin = makeAddr("gateAdmin"); @@ -156,8 +113,7 @@ contract DeterministicProxyDeployerTest is Test { bytes memory initCall = abi.encodeWithSignature("initialize(address)", gateAdmin); - bytes32 genericTestDeploySalt = bytes32(0x0000000000000000000000000000000000000000baaaaaacafeaaaaaacafef00) & - bytes32(uint256(uint160(address(deployerAddress))) << 96); + bytes32 genericTestDeploySalt = saltWithAddressInFirst20Bytes(deployerAddress, 20); bytes32 digest = factoryProxyDeployer.hashedDigestGenericCreation(genericTestDeploySalt, upgradeGateDeployCode, initCall);