Skip to content

Commit

Permalink
chore: add kinto devnet configs
Browse files Browse the repository at this point in the history
  • Loading branch information
fedealconada committed May 16, 2024
1 parent 841445f commit 2603a63
Show file tree
Hide file tree
Showing 14 changed files with 50 additions and 14 deletions.
1 change: 1 addition & 0 deletions .env.example
Original file line number Diff line number Diff line change
Expand Up @@ -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'
Expand Down
1 change: 0 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
dist/
cache/
out/
node_modules/
Expand Down
11 changes: 11 additions & 0 deletions hardhat.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down Expand Up @@ -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: [
{
Expand All @@ -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,
Expand Down
5 changes: 3 additions & 2 deletions lib.tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -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"]
}
5 changes: 5 additions & 0 deletions scripts/constants/networks.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down
22 changes: 17 additions & 5 deletions scripts/deploy/config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,9 @@ export const chains: Array<ChainSlug> = [
// 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,
Expand Down Expand Up @@ -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;
Expand Down Expand Up @@ -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 };
Expand Down
12 changes: 6 additions & 6 deletions scripts/deploy/utils/kinto/constants.json
Original file line number Diff line number Diff line change
@@ -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)"
Expand All @@ -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)"
]
Expand Down
1 change: 1 addition & 0 deletions src/enums/chainId.ts
Original file line number Diff line number Diff line change
Expand Up @@ -37,4 +37,5 @@ export enum ChainId {
SYNDR_SEPOLIA_L3 = 444444,
POLYNOMIAL_TESTNET = 80008,
KINTO = 7887,
KINTO_DEVNET = 412346,
}
1 change: 1 addition & 0 deletions src/enums/chainSlug.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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,
}
1 change: 1 addition & 0 deletions src/enums/chainSlugToId.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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,
};
1 change: 1 addition & 0 deletions src/enums/chainSlugToKey.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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,
};
1 change: 1 addition & 0 deletions src/enums/hardhatChainName.ts
Original file line number Diff line number Diff line change
Expand Up @@ -38,4 +38,5 @@ export enum HardhatChainName {
SYNDR_SEPOLIA_L3 = "syndr_sepolia_l3",
POLYNOMIAL_TESTNET = "polynomial_testnet",
KINTO = "kinto",
KINTO_DEVNET = "kinto_devnet",
}
1 change: 1 addition & 0 deletions src/enums/hardhatChainNameToSlug.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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,
};
1 change: 1 addition & 0 deletions src/enums/testnetIds.ts
Original file line number Diff line number Diff line change
Expand Up @@ -22,4 +22,5 @@ export const TestnetIds: ChainSlug[] = [
ChainSlug.REYA_CRONOS,
ChainSlug.SYNDR_SEPOLIA_L3,
ChainSlug.POLYNOMIAL_TESTNET,
ChainSlug.KINTO_DEVNET,
];

0 comments on commit 2603a63

Please sign in to comment.