Skip to content

Commit

Permalink
new chain integrations
Browse files Browse the repository at this point in the history
  • Loading branch information
livingrockrises committed Apr 8, 2024
1 parent 4b0a5ae commit 028e791
Show file tree
Hide file tree
Showing 8 changed files with 101 additions and 121 deletions.
113 changes: 0 additions & 113 deletions contracts/test/helpers/MockChainlinkAggregator.sol

This file was deleted.

59 changes: 59 additions & 0 deletions hardhat.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ import "@typechain/hardhat";
import "hardhat-gas-reporter";
import "solidity-coverage";
import "@nomiclabs/hardhat-etherscan";
// import "@nomicfoundation/hardhat-verify";

const walletUtils = require("./walletUtils");

Expand Down Expand Up @@ -271,6 +272,28 @@ const config: HardhatUserConfig = {
chainId: 245022926,
// gasPrice: 6400000
},
blastMainnet: {
url: process.env.BLAST_MAINNET_URL || "",
accounts: hardhatAccounts,
chainId: 81457,
},
degenChain: {
url: process.env.DEGEN_CHAIN_MAINNET || "https://rpc.degen.tips",
accounts: hardhatAccounts,
chainId: 666666666,
},
oliveTestnet: {
url:
process.env.OLIVE_TESTNET ||
"https://olive-network-testnet.rpc.caldera.xyz/http",
accounts: hardhatAccounts,
chainId: 8101902,
},
cardonaTestnet: {
url: process.env.OLIVE_TESTNET || "https://rpc.cardona.zkevm-rpc.com",
accounts: hardhatAccounts,
chainId: 2442,
},
opBNBMainnet: {
url: process.env.OP_BNB_MAINNET_URL || "",
accounts: hardhatAccounts,
Expand Down Expand Up @@ -327,6 +350,10 @@ const config: HardhatUserConfig = {
opBNBMainnet: process.env.OP_BNB_API_KEY || "",
mantleTestnet: "PLACEHOLDER_STRING",
mantleMainnet: "PLACEHOLDER_STRING",
blastMainnet: process.env.BLAST_API_KEY || "",
degenChain: "PLACEHOLDER_STRING",
oliveTestnet: "PLACEHOLDER_STRING",
cardonaTestnet: "PLACEHOLDER_STRING",
comboTestnet: process.env.COMBO_API_KEY || "",
zkEVMMainnet: process.env.ZKEVM_API_KEY || "",
zkEVMGoerli: process.env.ZKEVM_API_KEY || "",
Expand All @@ -341,6 +368,38 @@ const config: HardhatUserConfig = {
browserURL: "https://goerli.lineascan.build",
},
},
{
network: "blastMainnet",
chainId: 81457,
urls: {
apiURL: "https://api.blastscan.io/api",
browserURL: "https://blastscan.io/",
},
},
{
network: "degenChain",
chainId: 666666666,
urls: {
apiURL: "https://explorer.degen.tips/api",
browserURL: "https://explorer.degen.tips",
},
},
{
network: "oliveTestnet",
chainId: 8101902,
urls: {
apiURL: "https://olive-network-testnet.explorer.caldera.xyz/api",
browserURL: "https://olive-network-testnet.explorer.caldera.xyz/",
},
},
{
network: "cardonaTestnet",
chainId: 2442,
urls: {
apiURL: "https://cardona-zkevm.polygonscan.com/api",
browserURL: "https://cardona-zkevm.polygonscan.com/",
},
},
{
network: "linea-mainnet",
chainId: 59144,
Expand Down
1 change: 1 addition & 0 deletions lib/openzeppelin-contracts
Submodule openzeppelin-contracts added at fd81a9
5 changes: 3 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@
"@nomicfoundation/hardhat-network-helpers": "^1.0.8",
"@nomicfoundation/hardhat-toolbox": "^2.0.2",
"@nomiclabs/hardhat-ethers": "^2.2.3",
"@nomiclabs/hardhat-etherscan": "^3.1.7",
"@nomiclabs/hardhat-etherscan": "^3.1.8",
"@nomiclabs/hardhat-waffle": "^2.0.1",
"@typechain/ethers-v5": "^10.2.0",
"@typechain/hardhat": "^6.1.5",
Expand Down Expand Up @@ -94,6 +94,7 @@
"@ethersproject/abstract-signer": "^5.6.2",
"@ethersproject/constants": "^5.6.1",
"@mean-finance/uniswap-v3-oracle": "^1.0.3",
"@nomicfoundation/hardhat-verify": "^2.0.5",
"@openzeppelin/contracts": "4.8.1",
"@openzeppelin/contracts-upgradeable": "4.8.1",
"@pimlico/erc20-paymaster": "^0.0.1",
Expand All @@ -112,4 +113,4 @@
"solidity-bytes-utils": "^0.8.0",
"source-map-support": "^0.5.19"
}
}
}
9 changes: 9 additions & 0 deletions scripts/1-deploy-token-paymaster.ts
Original file line number Diff line number Diff line change
Expand Up @@ -74,6 +74,15 @@ async function deployTokenPaymasterContract(
tokenPaymasterComputedAddr
);
}

await run(`verify:verify`, {
address: tokenPaymasterComputedAddr,
constructorArguments: [
earlyOwnerAddress,
entryPointAddress,
verifyingSigner,
],
});
return tokenPaymasterComputedAddr;
} catch (err) {
console.log(err);
Expand Down
4 changes: 4 additions & 0 deletions scripts/2-deploy-oracle-aggregator.ts
Original file line number Diff line number Diff line change
Expand Up @@ -67,6 +67,10 @@ async function deployChainlinkOracleAggregatorContract(
oracleAggregatorComputedAddr
);
}
await run(`verify:verify`, {
address: oracleAggregatorComputedAddr,
constructorArguments: [earlyOwnerAddress],
});
return oracleAggregatorComputedAddr;
} catch (err) {
console.log(err);
Expand Down
3 changes: 1 addition & 2 deletions scripts/utils/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -271,8 +271,7 @@ export const deployContract = async (
// TODO
// Review gas price
const { hash, wait } = await deployerInstance.deploy(salt, contractByteCode, {
maxFeePerGas: 3e9,
maxPriorityFeePerGas: 2e9,
gasPrice: 2e9,
});

console.log(`Submitted transaction ${hash} for deployment`);
Expand Down
28 changes: 24 additions & 4 deletions yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -1174,6 +1174,21 @@
resolved "https://registry.yarnpkg.com/@nomicfoundation/hardhat-toolbox/-/hardhat-toolbox-2.0.2.tgz#ec95f23b53cb4e71a1a7091380fa223aad18f156"
integrity sha512-vnN1AzxbvpSx9pfdRHbUzTRIXpMLPXnUlkW855VaDk6N1pwRaQ2gNzEmFAABk4lWf11E00PKwFd/q27HuwYrYg==

"@nomicfoundation/hardhat-verify@^2.0.5":
version "2.0.5"
resolved "https://registry.yarnpkg.com/@nomicfoundation/hardhat-verify/-/hardhat-verify-2.0.5.tgz#dcc2cb5e5c55a39704c7d492436f80f05a4ca5a3"
integrity sha512-Tg4zu8RkWpyADSFIgF4FlJIUEI4VkxcvELsmbJn2OokbvH2SnUrqKmw0BBfDrtvP0hhmx8wsnrRKP5DV/oTyTA==
dependencies:
"@ethersproject/abi" "^5.1.2"
"@ethersproject/address" "^5.0.2"
cbor "^8.1.0"
chalk "^2.4.2"
debug "^4.1.1"
lodash.clonedeep "^4.5.0"
semver "^6.3.0"
table "^6.8.0"
undici "^5.14.0"

"@nomicfoundation/[email protected]":
version "0.1.1"
resolved "https://registry.yarnpkg.com/@nomicfoundation/solidity-analyzer-darwin-arm64/-/solidity-analyzer-darwin-arm64-0.1.1.tgz#4c858096b1c17fe58a474fe81b46815f93645c15"
Expand Down Expand Up @@ -1245,10 +1260,10 @@
resolved "https://registry.yarnpkg.com/@nomiclabs/hardhat-ethers/-/hardhat-ethers-2.2.3.tgz#b41053e360c31a32c2640c9a45ee981a7e603fe0"
integrity sha512-YhzPdzb612X591FOe68q+qXVXGG2ANZRvDo0RRUtimev85rCrAlv/TLMEZw5c+kq9AbzocLTVX/h2jVIFPL9Xg==

"@nomiclabs/hardhat-etherscan@^3.1.7":
version "3.1.7"
resolved "https://registry.yarnpkg.com/@nomiclabs/hardhat-etherscan/-/hardhat-etherscan-3.1.7.tgz#72e3d5bd5d0ceb695e097a7f6f5ff6fcbf062b9a"
integrity sha512-tZ3TvSgpvsQ6B6OGmo1/Au6u8BrAkvs1mIC/eURA3xgIfznUZBhmpne8hv7BXUzw9xNL3fXdpOYgOQlVMTcoHQ==
"@nomiclabs/hardhat-etherscan@^3.1.8":
version "3.1.8"
resolved "https://registry.yarnpkg.com/@nomiclabs/hardhat-etherscan/-/hardhat-etherscan-3.1.8.tgz#3c12ee90b3733e0775e05111146ef9418d4f5a38"
integrity sha512-v5F6IzQhrsjHh6kQz4uNrym49brK9K5bYCq2zQZ729RYRaifI9hHbtmK+KkIVevfhut7huQFEQ77JLRMAzWYjQ==
dependencies:
"@ethersproject/abi" "^5.1.2"
"@ethersproject/address" "^5.0.2"
Expand Down Expand Up @@ -6153,6 +6168,11 @@ lodash.camelcase@^4.3.0:
resolved "https://registry.yarnpkg.com/lodash.camelcase/-/lodash.camelcase-4.3.0.tgz#b28aa6288a2b9fc651035c7711f65ab6190331a6"
integrity sha512-TwuEnCnxbc3rAvhf/LbG7tJUDzhqXyFnv3dtzLOPgCG/hODL7WFnsbwktkD7yUV0RrreP/l1PALq/YSg6VvjlA==

lodash.clonedeep@^4.5.0:
version "4.5.0"
resolved "https://registry.yarnpkg.com/lodash.clonedeep/-/lodash.clonedeep-4.5.0.tgz#e23f3f9c4f8fbdde872529c1071857a086e5ccef"
integrity sha512-H5ZhCF25riFd9uB5UCkVKo61m3S/xZk1x4wA6yp/L3RFP6Z/eHH1ymQcGLo7J3GMPfm0V/7m1tryHuGVxpqEBQ==

lodash.debounce@^4.0.8:
version "4.0.8"
resolved "https://registry.yarnpkg.com/lodash.debounce/-/lodash.debounce-4.0.8.tgz#82d79bff30a67c4005ffd5e2515300ad9ca4d7af"
Expand Down

0 comments on commit 028e791

Please sign in to comment.