-
Notifications
You must be signed in to change notification settings - Fork 54
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #282 from pimlicolabs/etherspot-account
Etherspot account, actions and client
- Loading branch information
Showing
16 changed files
with
746 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
--- | ||
"permissionless": patch | ||
--- | ||
|
||
Added support for Etherspot Smart Account |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
12 changes: 12 additions & 0 deletions
12
packages/permissionless-test/mock-aa-infra/alto/constants.ts
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
94 changes: 94 additions & 0 deletions
94
packages/permissionless/accounts/etherspot/abi/EtherspotBootstrapAbi.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,94 @@ | ||
export const EtherspotBootstrapAbi = [ | ||
{ | ||
inputs: [ | ||
{ | ||
components: [ | ||
{ | ||
internalType: "address", | ||
name: "module", | ||
type: "address" | ||
}, | ||
{ | ||
internalType: "bytes", | ||
name: "data", | ||
type: "bytes" | ||
} | ||
], | ||
internalType: "struct BootstrapConfig[]", | ||
name: "$valdiators", | ||
type: "tuple[]" | ||
}, | ||
{ | ||
components: [ | ||
{ | ||
internalType: "address", | ||
name: "module", | ||
type: "address" | ||
}, | ||
{ | ||
internalType: "bytes", | ||
name: "data", | ||
type: "bytes" | ||
} | ||
], | ||
internalType: "struct BootstrapConfig[]", | ||
name: "$executors", | ||
type: "tuple[]" | ||
}, | ||
{ | ||
components: [ | ||
{ | ||
internalType: "address", | ||
name: "module", | ||
type: "address" | ||
}, | ||
{ | ||
internalType: "bytes", | ||
name: "data", | ||
type: "bytes" | ||
} | ||
], | ||
internalType: "struct BootstrapConfig", | ||
name: "_hook", | ||
type: "tuple" | ||
}, | ||
{ | ||
components: [ | ||
{ | ||
internalType: "address", | ||
name: "module", | ||
type: "address" | ||
}, | ||
{ | ||
internalType: "bytes", | ||
name: "data", | ||
type: "bytes" | ||
} | ||
], | ||
internalType: "struct BootstrapConfig[]", | ||
name: "_fallbacks", | ||
type: "tuple[]" | ||
} | ||
], | ||
name: "initMSA", | ||
outputs: [], | ||
stateMutability: "nonpayable", | ||
type: "function" | ||
} | ||
] | ||
|
||
export const EtherspotOnInstallAbi = [ | ||
{ | ||
inputs: [ | ||
{ | ||
internalType: "bytes", | ||
name: "data", | ||
type: "bytes" | ||
} | ||
], | ||
name: "onInstall", | ||
outputs: [], | ||
stateMutability: "nonpayable", | ||
type: "function" | ||
} | ||
] as const |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
import type { Address } from "viem" | ||
|
||
export const DUMMY_ECDSA_SIGNATURE = | ||
"0xfffffffffffffffffffffffffffffff0000000000000000000000000000000007aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa1c" | ||
|
||
export const VALIDATOR_TYPE = { | ||
ROOT: "0x00", | ||
VALIDATOR: "0x01", | ||
PERMISSION: "0x02" | ||
} as const | ||
|
||
export enum VALIDATOR_MODE { | ||
DEFAULT = "0x00", | ||
ENABLE = "0x01" | ||
} | ||
|
||
export type NetworkAddresses = { | ||
metaFactoryAddress: Address | ||
bootstrapAddress: Address | ||
validatorAddress: Address | ||
} | ||
|
||
export const DEFAULT_CONTRACT_ADDRESS: NetworkAddresses = { | ||
metaFactoryAddress: "0x93FB56A4a0B7160fbf8903d251Cc7A3fb9bA0933", // modularEtherspotWalletFactory | ||
bootstrapAddress: "0x1baCB2F1ef4fD02f02e32cCF70888D9Caeb5f066", | ||
validatorAddress: "0x7aCEE15c9FFc1e8f287C26E0f4C8244A0729F557" // multipleOwnerECDSAValidator | ||
} |
Oops, something went wrong.