Skip to content

Commit

Permalink
Smart wallet deterministic deployment config (#624)
Browse files Browse the repository at this point in the history
<!--- Provide a general summary of your changes in the Title above -->

## Description

<!--- Describe your changes in detail -->

## Motivation and Context

<!--- Why is this change required? What problem does it solve? -->
<!--- If it fixes an open issue, please link to the issue here. -->

## Does this change the ABI/API?

- [ ] This changes the ABI/API

<!-- If so, please describe how and what potential impact this may have -->

## What tests did you add/modify to account for these changes

<!--- Please describe in detail how you tested your changes. -->
<!--- Include details of your testing environment, tests ran to see how -->
<!--- your change affects other areas of the code, etc. -->

## Types of changes

<!--- What types of changes does your code introduce? Put an `x` in all the boxes that apply: -->

- [ ] Bug fix (non-breaking change which fixes an issue)
- [ ] New module / feature (non-breaking change which adds functionality)
- [ ] Breaking change (fix or feature that would cause existing functionality to not work as expected)

## Checklist:

<!--- Go over all the following points, and put an `x` in all the boxes that apply. -->
<!--- If you're unsure about any of these, don't hesitate to ask. We're here to help! -->

- [ ] My code follows the code style of this project.
- [ ] My change requires a change to the documentation.
- [ ] I have updated the documentation accordingly.
- [ ] I added a changeset to account for this change

## Reviewer Checklist:

- [ ] My review includes a symposis of the changes and potential issues
- [ ] The code style is enforced
- [ ] There are no risky / concerning changes / additions to the PR
  • Loading branch information
oveddan authored Nov 15, 2024
1 parent 0d8a4d3 commit 35de74c
Show file tree
Hide file tree
Showing 5 changed files with 17 additions and 4 deletions.
2 changes: 1 addition & 1 deletion .changeset/config.json
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,6 @@
"@zoralabs/frame-minter-contracts",
"docs",
"@zoralabs/1155-deployments",
"smart-wallet"
"@zoralabs/smart-wallet"
]
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
{
"constructorArgs": "0x000000000000000000000000ae4a210f777cd75e3f24b34929648c186f39510c",
"contractName": "ZoraAccountManager",
"creationCode": "0x60806040523461016d5761028b6020813803918261001c81610172565b93849283398101031261016d57516001600160a01b03811680820361016d576040516001600160401b0392906020810190848211818310176101575781604052600093848252833b1561013f577f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc80546001600160a01b031916821790557fbc7cd75a20ee27fd9adebab32041f755214dbc6bffa90cc0225b39da2e5c2d3b8580a2519081156101355783918291845af4903d15610127573d93841161011357610103936100f3601f8201601f1916602001610172565b908152809360203d92013e610197565b505b604051609090816101fb8239f35b634e487b7160e01b83526041600452602483fd5b610103935060609250610197565b5050505050610105565b60249060405190634c9c8ce360e01b82526004820152fd5b634e487b7160e01b600052604160045260246000fd5b600080fd5b6040519190601f01601f191682016001600160401b0381118382101761015757604052565b906101be57508051156101ac57805190602001fd5b604051630a12f52160e11b8152600490fd5b815115806101f1575b6101cf575090565b604051639996b31560e01b81526001600160a01b039091166004820152602490fd5b50803b156101c756fe608060405273ffffffffffffffffffffffffffffffffffffffff7f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc54166000808092368280378136915af43d82803e156056573d90f35b3d90fdfea2646970667358221220068df6c2cedfe642199950c7ee3914f8c1df6fd297828514443f4e5170cebd3964736f6c63430008140033",
"deployedAddress": "0x7777777f7bA9ce74A5d7f058B30Ac824d940fB52",
"deploymentCaller": "0x680E26B472d8cae8148ee21FCAd6A69D73766436",
"salt": "0x680e26b472d8cae8148ee21fcad6a69d737664366242e7d6f9ffd162e48658a0"
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
{
"creationCode": "0x6080806040523461001657610e91908161001c8239f35b600080fdfe6040608081526004908136101561001557600080fd5b600091823560e01c9081636002ed111461044c57816386881034146103f55781639541f9121461014b578163af8e821d146100af575063eae49c871461005a57600080fd5b346100ab57817ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc3601126100ab576100a790610094610637565b90519182916020835260208301906105b1565b0390f35b5080fd5b82843461014857817ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc360112610148576024359067ffffffffffffffff821161014857506055600b60209461012461011f73ffffffffffffffffffffffffffffffffffffffff9536908401610514565b61067f565b868151910120908551918683015235868201523081520160ff815320915191168152f35b80fd5b91905060a07ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc3601126102cd5781359160249067ffffffffffffffff82358181116103f15761019d9036908401610514565b946044359573ffffffffffffffffffffffffffffffffffffffff8088168098036103ed576064358481116103e9576101d89036908701610514565b92608435928284168094036103e557338260601c036103b0576101f96105f4565b3b15610355575b6102099061067f565b80511561032d576020815191018bf516908115610305578082036102d15750908188923b156102cd5761027597838851809a819582947f4f1ef2860000000000000000000000000000000000000000000000000000000084528a8401528b8b84015260448301906105b1565b03925af180156102c357610287578580f35b84116102995750505238808080808580f35b604185917f4e487b7100000000000000000000000000000000000000000000000000000000835252fd5b84513d88823e3d90fd5b8280fd5b6044918686928951937f12ae30e5000000000000000000000000000000000000000000000000000000008552840152820152fd5b8487517f741752c2000000000000000000000000000000000000000000000000000000008152fd5b8689517f4ca249dc000000000000000000000000000000000000000000000000000000008152fd5b88516107938082019082821089831117610385579180918e936106c98339039082f56102005788513d8c823e3d90fd5b8a8e60418c7f4e487b7100000000000000000000000000000000000000000000000000000000835252fd5b604487838a8c51927f4d2da7e20000000000000000000000000000000000000000000000000000000084523390840152820152fd5b8a80fd5b8980fd5b8880fd5b8680fd5b8284346101485760207ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc3601126101485782359067ffffffffffffffff8211610148575061011f6100a79361009492369101610514565b5050346100ab57817ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc3601126100ab5760209073ffffffffffffffffffffffffffffffffffffffff61049c6105f4565b915191168152f35b90601f7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0910116810190811067ffffffffffffffff8211176104e557604052565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b81601f820112156105895780359067ffffffffffffffff82116104e5576040519261056760207fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0601f86011601856104a4565b8284526020838301011161058957816000926020809301838601378301015290565b600080fd5b60005b8381106105a15750506000910152565b8181015183820152602001610591565b907fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0601f6020936105ed8151809281875287808801910161058e565b0116010190565b6055600b61079360405161060b60208301826104a4565b81815260208101916106c98339519020604051906040820152600060208201523081520160ff81532090565b61063f6105f4565b73ffffffffffffffffffffffffffffffffffffffff60405191166020820152602081526040810181811067ffffffffffffffff8211176104e55760405290565b6106c5602061068c610637565b9260405193816106a5869351809286808701910161058e565b82016106b98251809386808501910161058e565b010380845201826104a4565b9056fe60c0806040523461003757306080523360a052610756908161003d823960805181818161019501526102bc015260a051816102ee0152f35b600080fdfe6040608081526004908136101561001557600080fd5b600091823560e01c80634f1ef2861461020d57806352d1902d1461014d5763ad3cb1cc1461004257600080fd5b3461014957827ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc360112610149578151908282019082821067ffffffffffffffff83111761011d57508252600581526020907f352e302e300000000000000000000000000000000000000000000000000000008282015282519382859384528251928382860152825b84811061010757505050828201840152601f017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0168101030190f35b81810183015188820188015287955082016100cb565b8460416024927f4e487b7100000000000000000000000000000000000000000000000000000000835252fd5b8280fd5b50913461020a57807ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc36011261020a575073ffffffffffffffffffffffffffffffffffffffff7f00000000000000000000000000000000000000000000000000000000000000001630036101e457602090517f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc8152f35b517fe07c8dba000000000000000000000000000000000000000000000000000000008152fd5b80fd5b5090807ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc3601126101495781359073ffffffffffffffffffffffffffffffffffffffff93848316928381036105d25760249586359167ffffffffffffffff83116105ce57366023840112156105ce57828701359161028a83610646565b90610297875192836105d6565b83825260209384830195368c83830101116105ca578188928d889301893784010152807f00000000000000000000000000000000000000000000000000000000000000001680301490811561059c575b50610574577f00000000000000000000000000000000000000000000000000000000000000001633036105195785517f52d1902d00000000000000000000000000000000000000000000000000000000815283818a818b5afa8691816104e6575b5061037d5750505050505051917f4c9c8ce3000000000000000000000000000000000000000000000000000000008352820152fd5b9088888894938c7f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc918281036104b95750853b1561048c575080547fffffffffffffffffffffffff000000000000000000000000000000000000000016821790558451889392917fbc7cd75a20ee27fd9adebab32041f755214dbc6bffa90cc0225b39da2e5c2d3b8580a28251156104555750506104479582915190845af4913d1561044b573d61043961043082610646565b925192836105d6565b81528581943d92013e610680565b5080f35b5060609250610680565b95509550505050503461046757505080f35b7fb398979f000000000000000000000000000000000000000000000000000000008152fd5b83838851917f4c9c8ce3000000000000000000000000000000000000000000000000000000008352820152fd5b84908851917faa1d49a4000000000000000000000000000000000000000000000000000000008352820152fd5b9091508481813d8311610512575b6104fe81836105d6565b8101031261050e57519038610348565b8680fd5b503d6104f4565b606488600e8b868a51937f08c379a00000000000000000000000000000000000000000000000000000000085528401528201527f6e6f7420617574686f72697a65640000000000000000000000000000000000006044820152fd5b8887517fe07c8dba000000000000000000000000000000000000000000000000000000008152fd5b9050817f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc54161415386102e7565b8780fd5b8380fd5b5080fd5b90601f7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0910116810190811067ffffffffffffffff82111761061757604052565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b67ffffffffffffffff811161061757601f017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe01660200190565b906106bf575080511561069557805190602001fd5b60046040517f1425ea42000000000000000000000000000000000000000000000000000000008152fd5b81511580610717575b6106d0575090565b60249073ffffffffffffffffffffffffffffffffffffffff604051917f9996b315000000000000000000000000000000000000000000000000000000008352166004820152fd5b50803b156106c856fea2646970667358221220b0c759d2486bd764fa1eba13b9b4b76d08b6426add16b45f9ec55cb8454b0c2564736f6c63430008140033a2646970667358221220fa08c6965d4dda726e1c0a5346008f224ea842f94361ac77dbb7e9a71e793b9564736f6c63430008140033",
"deployedAddress": "0xF68e8DA655bEdeb3CFbDae7871ca82D603523447",
"salt": "0x0000000000000000000000000000000000000000000000000000000000000000"
}
4 changes: 2 additions & 2 deletions packages/smart-wallet/package.json
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
{
"name": "smart-wallet",
"name": "@zoralabs/smart-wallet",
"version": "0.0.0",
"main": "index.js",
"license": "MIT",
"private": true,
"version": "0.0.0",
"scripts": {
"prettier:check": "prettier --check 'src/**/*.sol' 'test/**/*.sol' 'script/**/*.sol'",
"prettier:write": "prettier --write 'src/**/*.sol' 'test/**/*.sol' 'script/**/*.sol'"
Expand Down
2 changes: 1 addition & 1 deletion packages/smart-wallet/src/ZoraAccountManager.sol
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.23;
pragma solidity >=0.8.20;

import {ERC1967Proxy} from "@openzeppelin/contracts/proxy/ERC1967/ERC1967Proxy.sol";

Expand Down

0 comments on commit 35de74c

Please sign in to comment.