Skip to content

Update Bico factory addresses #353

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

Open
wants to merge 4 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
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
21 changes: 21 additions & 0 deletions packages/permissionless-test/mock-aa-infra/alto/bico-constants.ts

Large diffs are not rendered by default.

165 changes: 0 additions & 165 deletions packages/permissionless-test/mock-aa-infra/alto/constants.ts

Large diffs are not rendered by default.

Large diffs are not rendered by default.

104 changes: 58 additions & 46 deletions packages/permissionless-test/mock-aa-infra/alto/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -15,15 +15,32 @@ import {
BICONOMY_DEFAULT_FALLBACK_HANDLER_CREATECALL,
BICONOMY_ECDSA_OWNERSHIP_REGISTRY_MODULE_CREATECALL,
BICONOMY_FACTORY_CREATECALL,
BICONOMY_SINGLETON_FACTORY_BYTECODE,
BICONOMY_SINGLETON_FACTORY_BYTECODE
} from "./bico-constants"
import {
ENTRY_POINT_SIMULATIONS_CREATECALL,
ENTRY_POINT_V06_CREATECALL,
ENTRY_POINT_V07_CREATECALL,
ERC_7579_TEST_MODULE_CREATECALL,
SIMPLE_ACCOUNT_FACTORY_V06_CREATECALL,
SIMPLE_ACCOUNT_FACTORY_V07_CREATECALL,
THIRDWEB_FACTORY_V06_CREATECALL,
THIRDWEB_FACTORY_V07_CREATECALL,
TRUST_ACCOUNT_FACET_CREATE_CALL,
TRUST_DEFAULT_FALLBACK_HANDLER,
TRUST_DIAMOND_CUT_FACET_CREATE_CALL,
TRUST_DIAMOND_LOUPE_FACET_CREATE_CALL,
TRUST_FACTORY_V06_CREATECALL,
TRUST_SECP256K1_VERIFICATION_FACET_CREATECALL,
TRUST_TOKEN_RECEIVER_FACET_CREATE_CALL
} from "./constants"
import {
ETHERSPOT_BOOTSTRAP_CREATECALL,
ETHERSPOT_IMPLEMENTATION,
ETHERSPOT_MULTIPLE_OWNER_ECDSA_VALIDATOR_CREATECALL,
ETHERSPOT_WALLET_FACTORY_CREATECALL,
ETHERSPOT_WALLET_FACTORY_CREATECALL
} from "./etherspot-constants"
import {
KERNEL_V06_ACCOUNT_V2_1_LOGIC_CREATECALL,
KERNEL_V06_ACCOUNT_V2_2_LOGIC_CREATECALL,
KERNEL_V06_ACCOUNT_V2_3_LOGIC_CREATECALL,
Expand All @@ -37,14 +54,20 @@ import {
KERNEL_V07_V3_1_ACCOUNT_V3_LOGIC_CREATECALL,
KERNEL_V07_V3_1_ECDSA_VALIDATOR_V3_CREATECALL,
KERNEL_V07_V3_1_FACTORY_CREATECALL,
KERNEL_V07_V3_1_WEB_AUTHN_VALIDATOR_CREATECALL,
KERNEL_V07_V3_1_WEB_AUTHN_VALIDATOR_CREATECALL
} from "./kernel-constants"
import {
LIGHT_ACCOUNT_FACTORY_V110_CREATECALL,
LIGHT_ACCOUNT_FACTORY_V200_CREATECALL,
LIGHT_ACCOUNT_FACTORY_V200_CREATECALL
} from "./light-constants"
import {
NEXUS_ACCOUNT_BOOTSTRAPPER_CREATECALL,
NEXUS_ACCOUNT_IMPLEMENTATION_CREATECALL,
NEXUS_BOOTSTRAP_LIB_CREATECALL,
NEXUS_K1_VALIDATOR_CREATECALL,
NEXUS_K1_VALIDATOR_FACTORY_CREATECALL,
NEXUS_K1_VALIDATOR_FACTORY_CREATECALL
} from "./nexus-constants"
import {
SAFE_7579_LAUNCHPAD_CREATECALL,
SAFE_7579_MODULE_CREATECALL,
SAFE_7579_REGISTRY_CREATECALL,
Expand All @@ -60,19 +83,8 @@ import {
SAFE_V06_MODULE_CREATECALL,
SAFE_V06_MODULE_SETUP_CREATECALL,
SAFE_V07_MODULE_CREATECALL,
SAFE_V07_MODULE_SETUP_CREATECALL,
SIMPLE_ACCOUNT_FACTORY_V06_CREATECALL,
SIMPLE_ACCOUNT_FACTORY_V07_CREATECALL,
THIRDWEB_FACTORY_V06_CREATECALL,
THIRDWEB_FACTORY_V07_CREATECALL,
TRUST_ACCOUNT_FACET_CREATE_CALL,
TRUST_DEFAULT_FALLBACK_HANDLER,
TRUST_DIAMOND_CUT_FACET_CREATE_CALL,
TRUST_DIAMOND_LOUPE_FACET_CREATE_CALL,
TRUST_FACTORY_V06_CREATECALL,
TRUST_SECP256K1_VERIFICATION_FACET_CREATECALL,
TRUST_TOKEN_RECEIVER_FACET_CREATE_CALL
} from "./constants"
SAFE_V07_MODULE_SETUP_CREATECALL
} from "./safe-constants"

const DETERMINISTIC_DEPLOYER = "0x4e59b44847b379578588920ca78fbf26c0b4956c"
const SAFE_SINGLETON_FACTORY = "0x914d7Fec6aaC8cd542e72Bca78B30650d45643d7"
Expand Down Expand Up @@ -361,6 +373,30 @@ export const setupContracts = async (rpc: string) => {
data: NEXUS_BOOTSTRAP_LIB_CREATECALL,
gas: 15_000_000n,
nonce: nonce++
}),
walletClient.sendTransaction({
to: DETERMINISTIC_DEPLOYER,
data: NEXUS_K1_VALIDATOR_CREATECALL,
gas: 15_000_000n,
nonce: nonce++
}),
walletClient.sendTransaction({
to: DETERMINISTIC_DEPLOYER,
data: NEXUS_K1_VALIDATOR_FACTORY_CREATECALL,
gas: 15_000_000n,
nonce: nonce++
}),
walletClient.sendTransaction({
to: DETERMINISTIC_DEPLOYER,
data: NEXUS_ACCOUNT_IMPLEMENTATION_CREATECALL,
gas: 15_000_000n,
nonce: nonce++
}),
walletClient.sendTransaction({
to: DETERMINISTIC_DEPLOYER,
data: NEXUS_ACCOUNT_BOOTSTRAPPER_CREATECALL,
gas: 15_000_000n,
nonce: nonce++
})
])

Expand Down Expand Up @@ -458,30 +494,6 @@ export const setupContracts = async (rpc: string) => {
data: BICONOMY_DEFAULT_FALLBACK_HANDLER_CREATECALL,
gas: 15_000_000n,
nonce: nonce++
}),
walletClient.sendTransaction({
to: BICONOMY_SINGLETON_FACTORY,
data: NEXUS_K1_VALIDATOR_CREATECALL,
gas: 15_000_000n,
nonce: nonce++
}),
walletClient.sendTransaction({
to: BICONOMY_SINGLETON_FACTORY,
data: NEXUS_K1_VALIDATOR_FACTORY_CREATECALL,
gas: 15_000_000n,
nonce: nonce++
}),
walletClient.sendTransaction({
to: BICONOMY_SINGLETON_FACTORY,
data: NEXUS_ACCOUNT_IMPLEMENTATION_CREATECALL,
gas: 15_000_000n,
nonce: nonce++
}),
walletClient.sendTransaction({
to: BICONOMY_SINGLETON_FACTORY,
data: NEXUS_ACCOUNT_BOOTSTRAPPER_CREATECALL,
gas: 15_000_000n,
nonce: nonce++
})
])

Expand Down Expand Up @@ -675,10 +687,10 @@ export const setupContracts = async (rpc: string) => {
"0x4Fd8d57b94966982B62e9588C27B4171B55E8354", // ERC7579 Test Module
"0x85e23b94e7F5E9cC1fF78BCe78cfb15B81f0DF00", // Thirdweb factory 0.6
"0x4be0ddfebca9a5a4a617dee4dece99e7c862dceb", // Thirdweb factory 0.7
"0x00000bb19a3579F4D779215dEf97AFbd0e30DB55", // Nexus K1 Validator Factory
"0x00000004171351c442B202678c48D8AB5B321E8f", // Nexus K1 Validator
"0x000000039dfcAd030719B07296710F045F0558f7", // Nexus Account Implementation
"0x00000008c901d8871b6F6942De0B5D9cCf3873d3", // Nexus Account Bootstrapper
"0x00000024115AA990F0bAE0B6b0D5B8F68b684cd6", // Nexus K1 Validator Factory
"0x0000002D6DB27c52E3C11c1Cf24072004AC75cBa", // Nexus K1 Validator
"0x000000008761e87f023f65c49dc9cb1c7edfeaaf", // Nexus Account Implementation
"0x000000F5b753Fdd20C5CA2D7c1210b3Ab1EA5903", // Nexus Account Bootstrapper
"0x6c77ddf87a1717465d29f8f16f44711eb0c839c0" // Nexus BootstrapLib
])
}

Large diffs are not rendered by default.

10 changes: 10 additions & 0 deletions packages/permissionless-test/mock-aa-infra/alto/light-constants.ts

Large diffs are not rendered by default.

14 changes: 14 additions & 0 deletions packages/permissionless-test/mock-aa-infra/alto/nexus-constants.ts

Large diffs are not rendered by default.

59 changes: 59 additions & 0 deletions packages/permissionless-test/mock-aa-infra/alto/safe-constants.ts

Large diffs are not rendered by default.

6 changes: 3 additions & 3 deletions packages/permissionless-test/src/utils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -202,10 +202,10 @@ export const getPublicClient = (anvilRpc: string) => {
const transport = http(anvilRpc, {
// onFetchRequest: async (req) => {
// console.log(await req.json(), "request")
// },
// onFetchResponse: async (response) => {
// console.log(await response.clone().json(), "response")
// }
//onFetchResponse: async (response) => {
// console.log(await response.clone().json(), "response")
//}
})

return createPublicClient({
Expand Down
8 changes: 4 additions & 4 deletions packages/permissionless/accounts/nexus/toNexusSmartAccount.ts
Original file line number Diff line number Diff line change
Expand Up @@ -85,8 +85,8 @@ const BICONOMY_ADDRESSES: {
K1_VALIDATOR_FACTORY_ADDRESS: Address
K1_VALIDATOR_ADDRESS: Address
} = {
K1_VALIDATOR_FACTORY_ADDRESS: "0x00000bb19a3579F4D779215dEf97AFbd0e30DB55",
K1_VALIDATOR_ADDRESS: "0x00000004171351c442B202678c48D8AB5B321E8f"
K1_VALIDATOR_FACTORY_ADDRESS: "0x00000024115AA990F0bAE0B6b0D5B8F68b684cd6",
K1_VALIDATOR_ADDRESS: "0x0000002D6DB27c52E3C11c1Cf24072004AC75cBa"
}

export type ToNexusSmartAccountParameters = Prettify<{
Expand Down Expand Up @@ -131,8 +131,8 @@ export async function toNexusSmartAccount(
version,
factoryAddress = BICONOMY_ADDRESSES.K1_VALIDATOR_FACTORY_ADDRESS,
validatorAddress = BICONOMY_ADDRESSES.K1_VALIDATOR_ADDRESS,
attesters = [],
threshold = 0
attesters = ["0x000000333034E9f539ce08819E12c1b8Cb29084d"],
threshold = 1
} = parameters

const localOwner = await toOwner({ owner: owners[0] })
Expand Down
Loading