Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

EIP-6551 compat #27

Merged
merged 43 commits into from
Oct 13, 2023
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
Show all changes
43 commits
Select commit Hold shift + click to select a range
23c3a86
upgrade to latest account-abstraction contracts
jfschwarz Apr 26, 2023
f76da22
fix package json
jfschwarz May 10, 2023
4170293
adjust tests
jfschwarz May 10, 2023
4e7cf06
trial to fix vercel routes
jfschwarz May 10, 2023
217223d
fix deploy script for gnosis chain
jfschwarz May 11, 2023
6e53bb0
implement IERC6551Account
jfschwarz May 30, 2023
3d6d79d
restructure contract inheritance hierarchy
jfschwarz Jun 7, 2023
203d1d2
add mech factory
jfschwarz Jun 7, 2023
1f67b0c
refactor contracts
jfschwarz Jun 12, 2023
de98dec
add erc20 threshold mech
jfschwarz Jun 12, 2023
c749149
cleanup
jfschwarz Jun 12, 2023
e264243
update docs
jfschwarz Jun 12, 2023
06d0971
adjust all deploy functions and migrate them to viem
jfschwarz Jun 14, 2023
b608faa
add hierarchy graph
jfschwarz Jun 20, 2023
139d356
adding exports
jfschwarz Jul 13, 2023
f8436f9
Merge branch 'main' into erc-6551
jfschwarz Aug 18, 2023
52484d9
fixes after merge
jfschwarz Aug 18, 2023
cdab142
upgrade deps
jfschwarz Aug 18, 2023
98c79c1
6551 updates and prevent ownership cycles
jfschwarz Aug 21, 2023
eb19c39
fine-tune execution interface
jfschwarz Aug 21, 2023
81dbd52
upgrade tooling
jfschwarz Aug 21, 2023
00304e4
ethers v5 -> v6 migration
jfschwarz Aug 21, 2023
8d249e6
erc165
jfschwarz Aug 21, 2023
a5a32fe
tokenbound deterministic deployment test green
jfschwarz Aug 25, 2023
cd7e95d
update 4337 entrypoint address
jfschwarz Aug 25, 2023
4167db5
fix 4337 tests
jfschwarz Aug 25, 2023
f399e1d
fix missing onlyOperator annotation
jfschwarz Aug 25, 2023
ee82d3f
improve test coverage
jfschwarz Aug 25, 2023
c2f8e3c
test fixes
jfschwarz Aug 28, 2023
a39dc16
front-end updates
jfschwarz Aug 28, 2023
5186a9c
fix deploy scripts
jfschwarz Aug 28, 2023
9fe7e05
migrate from n.xyz to sequencer
jfschwarz Sep 1, 2023
9f371eb
Merge pull request #28 from gnosis/sequencer
jfschwarz Sep 1, 2023
c57769b
deploy 6551 factory
jfschwarz Sep 4, 2023
3198123
more solid deploy script
jfschwarz Sep 4, 2023
1381bd4
fix wallet connect
jfschwarz Sep 4, 2023
63edc04
fix a JS error when switching chains
jfschwarz Oct 12, 2023
7354c08
work around issue of tokenID not being set by sequence api
jfschwarz Oct 12, 2023
0c7cc8c
fix walletconnect v2 issues
jfschwarz Oct 12, 2023
3ca7ec0
fix a ux issue
jfschwarz Oct 12, 2023
bf94f2e
upgrade to latest 6551 contract and adjust accordingly
jfschwarz Oct 13, 2023
11e9b4d
fix tests
jfschwarz Oct 13, 2023
39ef6c7
update eip6551 registry address
jfschwarz Oct 13, 2023
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
adjust all deploy functions and migrate them to viem
  • Loading branch information
jfschwarz committed Jun 14, 2023
commit 06d0971ca66836084507325d324b03c6af18a374
5 changes: 5 additions & 0 deletions TODO.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,3 +5,8 @@
- check what the Safe indexer requires to pick up ZodiacMechs
- more requirements listed here: https://www.notion.so/Simpler-safe-mastercopy-dd8cf22626794b4aade600e1aa16da0e
- ZodiacMech should allow updating the ERC4337 entrypoint

## SDK

- get rid of zodiac dep
- migrate to viem
14 changes: 5 additions & 9 deletions contracts/MechFactory.sol
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import "./libraries/MinimalProxyStore.sol";
contract MechFactory {
event MechCreated(
address indexed proxy,
address indexed masterCopy,
address indexed mastercopy,
bytes context
);

Expand All @@ -25,15 +25,11 @@ contract MechFactory {
function createProxy(
address target,
bytes memory context,
uint256 saltNonce
bytes32 salt
) internal returns (address result) {
if (address(target) == address(0)) revert ZeroAddress(target);
if (address(target).code.length == 0) revert TargetHasNoCode(target);

bytes32 salt = keccak256(
abi.encodePacked(keccak256(context), saltNonce)
);

address proxy = MinimalProxyStore.cloneDeterministic(
target,
context,
Expand All @@ -46,12 +42,12 @@ contract MechFactory {
}

function deployMech(
address masterCopy,
address mastercopy,
bytes memory context,
bytes memory initialCall,
uint256 saltNonce
bytes32 salt
) public returns (address proxy) {
proxy = createProxy(masterCopy, context, saltNonce);
proxy = createProxy(mastercopy, context, salt);

if (initialCall.length > 0) {
(bool success, ) = proxy.call(initialCall);
Expand Down
23 changes: 16 additions & 7 deletions sdk/constants.ts
Original file line number Diff line number Diff line change
@@ -1,12 +1,21 @@
export const MODULE_PROXY_FACTORY_ADDRESS =
"0x000000000000aDdB49795b0f9bA5BC298cDda236"
export const MECH_FACTORY_ADDRESS =
"0x000000000000000000000000000000000000eeee" as const // TODO get MechFactory deployed to a nice vanity address

export const DEFAULT_SALT =
"0x0000000000000000000000000000000000000000000000000000000000000000"
export const ERC6551_REGISTRY_ADDRESS =
"0x0000000000000000000000000000000000006551" as const // TODO

export const ERC2470_SINGLETON_FACTORY_ADDRESS =
"0xce0042b868300000d44a59004da54a005ffdcf9f"
"0xce0042b868300000d44a59004da54a005ffdcf9f" as const

export const ZERO_ADDRESS =
"0x0000000000000000000000000000000000000000" as const

export const DEFAULT_SALT =
"0x0000000000000000000000000000000000000000000000000000000000000000" as const

export const ZERO_ADDRESS = "0x0000000000000000000000000000000000000000"
export const SENTINEL_MODULES =
"0x0000000000000000000000000000000000000001" as const

export const SENTINEL_MODULES = "0x0000000000000000000000000000000000000001"
export const ERC6551_REGISTRY_ABI = [
"createAccount(address implementation, uint256 chainId, address tokenContract, uint256 tokenId, uint256 salt, bytes initData) returns (address)",
]
164 changes: 0 additions & 164 deletions sdk/deploy/deployERC1155Mech.ts

This file was deleted.

Loading