diff --git a/.env.example b/.env.example index 58f4a1032..cb53b2fb1 100644 --- a/.env.example +++ b/.env.example @@ -23,6 +23,7 @@ LYRA_API_KEY=xxx XAI_API_KEY=xxx BASESCAN_API_KEY=xxx KINTO_API_KEY=xxx +KINTO_DEVNET_API_KEY=xxx # rpc ARBITRUM_RPC='https://arb1.arbitrum.io/rpc' diff --git a/.gitignore b/.gitignore index 6d4b1a22b..ab182164f 100644 --- a/.gitignore +++ b/.gitignore @@ -1,4 +1,3 @@ -dist/ cache/ out/ node_modules/ diff --git a/hardhat.config.ts b/hardhat.config.ts index 99859b620..6d65f0042 100644 --- a/hardhat.config.ts +++ b/hardhat.config.ts @@ -98,11 +98,13 @@ if (isProduction) { ChainId.POLYNOMIAL_TESTNET ), [HardhatChainName.KINTO]: getChainConfig(ChainId.KINTO), + [HardhatChainName.KINTO_DEVNET]: getChainConfig(ChainId.KINTO_DEVNET), }; } const config: HardhatUserConfig = { defaultNetwork: "hardhat", + // @ts-ignore abiExporter: { path: "artifacts/abi", flat: true, @@ -139,6 +141,7 @@ const config: HardhatUserConfig = { reya: process.env.REYA_API_KEY || "", syndrSepoliaL3: process.env.SYNDR_API_KEY || "", kinto: process.env.KINTO_API_KEY || "", + kinto_devnet: process.env.KINTO_DEVNET_API_KEY || "", }, customChains: [ { @@ -165,6 +168,14 @@ const config: HardhatUserConfig = { browserURL: "https://basescan.org/", }, }, + { + network: "kinto_devnet", + chainId: ChainId.KINTO_DEVNET, + urls: { + apiURL: "https://kinto-upgrade-dev-2.explorer.caldera.xyz/api", + browserURL: "https://kinto-upgrade-dev-2.explorer.caldera.xyz", + }, + }, { network: "kinto", chainId: ChainId.KINTO, diff --git a/lib.tsconfig.json b/lib.tsconfig.json index 9cdbb5cff..63e2dc881 100644 --- a/lib.tsconfig.json +++ b/lib.tsconfig.json @@ -2,11 +2,12 @@ "compilerOptions": { "target": "es2018", "module": "commonjs", - "strict": true, + "strict": false, "esModuleInterop": true, "outDir": "dist", "declaration": true, "resolveJsonModule": true }, - "include": ["./src"] + "include": ["./src", "./scripts/deploy/utils/kinto"], + "files": ["./hardhat.config.ts"] } diff --git a/scripts/constants/networks.ts b/scripts/constants/networks.ts index 1f8193463..ce046d94f 100644 --- a/scripts/constants/networks.ts +++ b/scripts/constants/networks.ts @@ -204,6 +204,11 @@ export function getJsonRpcUrl(chain: HardhatChainName | ChainId): string { jsonRpcUrl = process.env.KINTO_RPC as string; break; + case HardhatChainName.KINTO_DEVNET: + case ChainId.KINTO_DEVNET: + jsonRpcUrl = process.env.KINTO_RPC_DEVNET as string; + break; + default: if (process.env.NEW_RPC) { jsonRpcUrl = process.env.NEW_RPC as string; diff --git a/scripts/deploy/config.ts b/scripts/deploy/config.ts index 183550176..c35fb642e 100644 --- a/scripts/deploy/config.ts +++ b/scripts/deploy/config.ts @@ -33,7 +33,9 @@ export const chains: Array = [ // ChainSlug.GOERLI, // ChainSlug.ARBITRUM_SEPOLIA, // ChainSlug.OPTIMISM_SEPOLIA, - ChainSlug.KINTO, + // ChainSlug.KINTO, + ChainSlug.KINTO_DEVNET, + // ChainSlug.HARDHAT, // ChainSlug.POLYGON_MUMBAI, // ChainSlug.SX_NETWORK_TESTNET, // ChainSlug.SX_NETWORK, @@ -71,10 +73,14 @@ export const sendTransaction = true; export const newRoleStatus = true; export const filterChains: number[] = chains; export const filterSiblingChains: number[] = [ - ChainSlug.ARBITRUM, - ChainSlug.BASE, - ChainSlug.MAINNET, - ChainSlug.OPTIMISM, + // ChainSlug.ARBITRUM, + // ChainSlug.BASE, + // ChainSlug.MAINNET, + // ChainSlug.OPTIMISM, + // ChainSlug.GOERLI, + ChainSlug.ARBITRUM_SEPOLIA, + // ChainSlug.KINTO_DEVNET, + // ChainSlug.OPTIMISM_SEPOLIA, ]; export const capacitorType = 1; export const maxPacketLength = 1; @@ -280,6 +286,12 @@ export const overrides = ( gasLimit: 4_000_000, gasPrice, }; + } else if (chain == ChainSlug.KINTO_DEVNET) { + return { + type, + gasLimit: 4_000_000, + gasPrice, + }; } else if (chainConfig[chain] && chainConfig[chain].overrides) { return chainConfig[chain].overrides!; } else return { type, gasLimit, gasPrice }; diff --git a/scripts/deploy/utils/kinto/constants.json b/scripts/deploy/utils/kinto/constants.json index daee345c9..5bb1d7458 100644 --- a/scripts/deploy/utils/kinto/constants.json +++ b/scripts/deploy/utils/kinto/constants.json @@ -1,9 +1,9 @@ { "KINTO_DATA": { - "chainId": 7887, + "chainId": 412346, "contracts": { "kintoID": { - "address": "0xf369f78E3A0492CC4e96a90dae0728A38498e9c7", + "address": "0xCa41d9C3f13a8096356E6fddf0a29C51A938c410", "abi": [ "function nonces(address) view returns (uint256)", "function domainSeparator() view returns (bytes32)" @@ -20,23 +20,23 @@ ] }, "factory": { - "address": "0x8a4720488CA32f1223ccFE5A087e250fE3BC5D75", + "address": "0xB8818F4c0CE119AC274f217e9C11506DCf1bBb70", "abi": [ "function deployContract(address contractOwner, uint256 amount, bytes memory bytecode, bytes32 salt) returns (address)" ] }, "entryPoint": { - "address": "0x2843C269D2a64eCfA63548E8B3Fc0FD23B7F70cb", + "address": "0x302b00A0b9C865F89099d27F7538CEe33E9A4f92", "abi": [ "function handleOps(tuple(address sender, uint256 nonce, bytes initCode, bytes callData, uint256 callGasLimit, uint256 verificationGasLimit, uint256 preVerificationGas, uint256 maxFeePerGas, uint256 maxPriorityFeePerGas, bytes paymasterAndData, bytes signature)[] ops, address beneficiary)" ] }, "paymaster": { - "address": "0x1842a4EFf3eFd24c50B63c3CF89cECEe245Fc2bd", + "address": "0x8dc62b6FAF2929a58a1fca99aCF394ddf0CfAD16", "abi": ["function balances(address) view returns (uint256)"] }, "deployer": { - "address": "0xcab6dF19e2C77493547baB23ad85597f8303CE92", + "address": "0x3a4ee5742b854688a35DE9F853Cb0D55e7D80c96", "abi": [ "function deploy(address owner, bytes calldata bytecode, bytes32 salt) public returns (address)" ] diff --git a/src/enums/chainId.ts b/src/enums/chainId.ts index 0cd79d86f..ad5ef988a 100644 --- a/src/enums/chainId.ts +++ b/src/enums/chainId.ts @@ -37,4 +37,5 @@ export enum ChainId { SYNDR_SEPOLIA_L3 = 444444, POLYNOMIAL_TESTNET = 80008, KINTO = 7887, + KINTO_DEVNET = 412346, } diff --git a/src/enums/chainSlug.ts b/src/enums/chainSlug.ts index 84260b648..59bae19f3 100644 --- a/src/enums/chainSlug.ts +++ b/src/enums/chainSlug.ts @@ -39,4 +39,5 @@ export enum ChainSlug { SYNDR_SEPOLIA_L3 = ChainId.SYNDR_SEPOLIA_L3, POLYNOMIAL_TESTNET = ChainId.POLYNOMIAL_TESTNET, KINTO = ChainId.KINTO, + KINTO_DEVNET = ChainId.KINTO_DEVNET, } diff --git a/src/enums/chainSlugToId.ts b/src/enums/chainSlugToId.ts index d101f9ebb..26a478be4 100644 --- a/src/enums/chainSlugToId.ts +++ b/src/enums/chainSlugToId.ts @@ -40,4 +40,5 @@ export const ChainSlugToId = { [ChainSlug.SYNDR_SEPOLIA_L3]: ChainId.SYNDR_SEPOLIA_L3, [ChainSlug.POLYNOMIAL_TESTNET]: ChainId.POLYNOMIAL_TESTNET, [ChainSlug.KINTO]: ChainId.KINTO, + [ChainSlug.KINTO_DEVNET]: ChainId.KINTO_DEVNET, }; diff --git a/src/enums/chainSlugToKey.ts b/src/enums/chainSlugToKey.ts index 71f624b1a..9b46e9586 100644 --- a/src/enums/chainSlugToKey.ts +++ b/src/enums/chainSlugToKey.ts @@ -40,4 +40,5 @@ export const ChainSlugToKey = { [ChainSlug.SYNDR_SEPOLIA_L3]: HardhatChainName.SYNDR_SEPOLIA_L3, [ChainSlug.POLYNOMIAL_TESTNET]: HardhatChainName.POLYNOMIAL_TESTNET, [ChainSlug.KINTO]: HardhatChainName.KINTO, + [ChainSlug.KINTO_DEVNET]: HardhatChainName.KINTO_DEVNET, }; diff --git a/src/enums/hardhatChainName.ts b/src/enums/hardhatChainName.ts index 62e81f768..3bdb4133e 100644 --- a/src/enums/hardhatChainName.ts +++ b/src/enums/hardhatChainName.ts @@ -38,4 +38,5 @@ export enum HardhatChainName { SYNDR_SEPOLIA_L3 = "syndr_sepolia_l3", POLYNOMIAL_TESTNET = "polynomial_testnet", KINTO = "kinto", + KINTO_DEVNET = "kinto_devnet", } diff --git a/src/enums/hardhatChainNameToSlug.ts b/src/enums/hardhatChainNameToSlug.ts index 1cbfd10b8..693682481 100644 --- a/src/enums/hardhatChainNameToSlug.ts +++ b/src/enums/hardhatChainNameToSlug.ts @@ -40,4 +40,5 @@ export const hardhatChainNameToSlug = { [HardhatChainName.SYNDR_SEPOLIA_L3]: ChainSlug.SYNDR_SEPOLIA_L3, [HardhatChainName.POLYNOMIAL_TESTNET]: ChainSlug.POLYNOMIAL_TESTNET, [HardhatChainName.KINTO]: ChainSlug.KINTO, + [HardhatChainName.KINTO_DEVNET]: ChainSlug.KINTO_DEVNET, }; diff --git a/src/enums/testnetIds.ts b/src/enums/testnetIds.ts index b89bd73fb..3220ae7d5 100644 --- a/src/enums/testnetIds.ts +++ b/src/enums/testnetIds.ts @@ -22,4 +22,5 @@ export const TestnetIds: ChainSlug[] = [ ChainSlug.REYA_CRONOS, ChainSlug.SYNDR_SEPOLIA_L3, ChainSlug.POLYNOMIAL_TESTNET, + ChainSlug.KINTO_DEVNET, ];