Skip to content

Commit

Permalink
Add polygonzkevm testnet to verification script (#1716)
Browse files Browse the repository at this point in the history
* Add polygon-zkevm to verification script

* Change to currently set secret

* Get rid of https
  • Loading branch information
elvijsTDL authored Oct 9, 2023
1 parent 7d767c8 commit 46f6d40
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 20 deletions.
3 changes: 2 additions & 1 deletion .github/workflows/daily-slack-message.yml
Original file line number Diff line number Diff line change
Expand Up @@ -31,4 +31,5 @@ jobs:
ARBISCAN_API_KEY: ${{ secrets.ARBISCAN_API_KEY }}
BSCSCAN_API_KEY: ${{ secrets.BSCSCAN_API_KEY }}
CELOSCAN_API_KEY: ${{ secrets.CELOSCAN_API_KEY }}
GNOSISSCAN_API_KEY: ${{ secrets.GNOSISSCAN_API_KEY}}
GNOSISSCAN_API_KEY: ${{ secrets.GNOSISSCAN_API_KEY}}
ZKEVM_POLYGONSCAN_API_KEY: ${{ secrets.ZKEVM_POLYGONSCAN_API_KEY }}
25 changes: 6 additions & 19 deletions tasks/daily-slack-bot.js
Original file line number Diff line number Diff line change
Expand Up @@ -40,73 +40,63 @@ const networkSpecificData = {
"eth-goerli": {
url: "https://api-goerli.etherscan.io/api",
key: process.env.ETHERSCAN_API_KEY,
wrapperTokenAddress: "0xf2d68898557ccb2cf4c10c3ef2b034b2a69dad00",
},
"polygon-mumbai": {
url: "https://api-testnet.polygonscan.com/api",
key: process.env.POLYGONSCAN_API_KEY,
wrapperTokenAddress: "0x5d8b4c2554aeb7e86f387b4d6c00ac33499ed01f",
},
"optimism-goerli": {
url: "https://api-goerli-optimistic.etherscan.io/api",
key: process.env.OPTIMISTIC_API_KEY,
wrapperTokenAddress: "0xac7a5cf2e0a6db31456572871ee33eb6212014a9",
},
"arbitrum-goerli": {
url: "https://api-goerli.arbiscan.io/api",
key: process.env.ARBISCAN_API_KEY,
wrapperTokenAddress: "0xac7a5cf2e0a6db31456572871ee33eb6212014a9",
},
"avalanche-fuji": {
url: "https://api-testnet.snowtrace.io/api",
key: process.env.SNOWTRACE_API_KEY,
wrapperTokenAddress: "0x24f3631dbbf6880c684c5e59578c21194e285baf",
},
"eth-sepolia": {
url: "https://api-sepolia.etherscan.io/api",
key: process.env.ETHERSCAN_API_KEY,
wrapperTokenAddress: "0x9Ce2062b085A2268E8d769fFC040f6692315fd2c",
},
"xdai-mainnet": {
url: "https://api.gnosisscan.io/api",
key: process.env.GNOSISSCAN_API_KEY,
wrapperTokenAddress: "0x66e454105ae553cfa87ad4dc4cdf128c841fcd73",
},
"polygon-mainnet": {
url: "https://api.polygonscan.com/api",
key: process.env.POLYGONSCAN_API_KEY,
wrapperTokenAddress: "0xcaa7349cea390f89641fe306d93591f87595dc1f",
},
"optimism-mainnet": {
url: "https://api-optimistic.etherscan.io/api",
key: process.env.OPTIMISTIC_API_KEY,
wrapperTokenAddress: "0x7d342726B69C28D942ad8BfE6Ac81b972349d524",
},
"arbitrum-one": {
url: "https://api.arbiscan.io/api",
key: process.env.ARBISCAN_API_KEY,
wrapperTokenAddress: "0x521677a61d101a80ce0fb903b13cb485232774ee",
},
"avalanche-c": {
url: "https://api.snowtrace.io/api",
key: process.env.SNOWTRACE_API_KEY,
wrapperTokenAddress: "0x7cd00c2b9a78f270b897457ab070274e4a17de83",
},
"bsc-mainnet": {
url: "https://api.bscscan.com/api",
key: process.env.BSCSCAN_API_KEY,
wrapperTokenAddress: "0x744786ab00ed5a0b77ca754eb6f3ec0607c7fa79",
},
"eth-mainnet": {
url: "https://api.etherscan.io/api",
key: process.env.ETHERSCAN_API_KEY,
wrapperTokenAddress: "0x4f228bf911ed67730e4b51b1f82ac291b49053ee",
},
"celo-mainnet": {
url: "https://api.celoscan.io/api",
key: process.env.CELOSCAN_API_KEY,
wrapperTokenAddress: "0x3acb9a08697b6db4cd977e8ab42b6f24722e6d6e",
},
"polygon-zkevm-testnet": {
url: "https://api-testnet-zkevm.polygonscan.com/api",
key: process.env.ZKEVM_POLYGONSCAN_API_KEY,
}
};

const superTokenFactoryABI = [{ "inputs": [{ "internalType": "contract ISuperfluid", "name": "host", "type": "address" }, { "internalType": "contract ISuperToken", "name": "superTokenLogic", "type": "address" }, { "internalType": "contract IConstantOutflowNFT", "name": "constantOutflowNFTLogic", "type": "address" }, { "internalType": "contract IConstantInflowNFT", "name": "constantInflowNFTLogic", "type": "address" }, { "internalType": "contract IPoolAdminNFT", "name": "poolAdminNFT", "type": "address" }, { "internalType": "contract IPoolMemberNFT", "name": "poolMemberNFT", "type": "address" }], "stateMutability": "nonpayable", "type": "constructor" }, { "inputs": [], "name": "SUPER_TOKEN_FACTORY_ALREADY_EXISTS", "type": "error" }, { "inputs": [], "name": "SUPER_TOKEN_FACTORY_DOES_NOT_EXIST", "type": "error" }, { "inputs": [], "name": "SUPER_TOKEN_FACTORY_NON_UPGRADEABLE_IS_DEPRECATED", "type": "error" }, { "inputs": [], "name": "SUPER_TOKEN_FACTORY_ONLY_GOVERNANCE_OWNER", "type": "error" }, { "inputs": [], "name": "SUPER_TOKEN_FACTORY_ONLY_HOST", "type": "error" }, { "inputs": [], "name": "SUPER_TOKEN_FACTORY_UNINITIALIZED", "type": "error" }, { "inputs": [], "name": "SUPER_TOKEN_FACTORY_ZERO_ADDRESS", "type": "error" }, { "anonymous": false, "inputs": [{ "indexed": false, "internalType": "bytes32", "name": "uuid", "type": "bytes32" }, { "indexed": false, "internalType": "address", "name": "codeAddress", "type": "address" }], "name": "CodeUpdated", "type": "event" }, { "anonymous": false, "inputs": [{ "indexed": true, "internalType": "contract ISuperToken", "name": "token", "type": "address" }], "name": "CustomSuperTokenCreated", "type": "event" }, { "anonymous": false, "inputs": [{ "indexed": false, "internalType": "uint8", "name": "version", "type": "uint8" }], "name": "Initialized", "type": "event" }, { "anonymous": false, "inputs": [{ "indexed": true, "internalType": "contract ISuperToken", "name": "token", "type": "address" }], "name": "SuperTokenCreated", "type": "event" }, { "anonymous": false, "inputs": [{ "indexed": true, "internalType": "contract ISuperToken", "name": "tokenLogic", "type": "address" }], "name": "SuperTokenLogicCreated", "type": "event" }, { "inputs": [], "name": "CONSTANT_INFLOW_NFT_LOGIC", "outputs": [{ "internalType": "contract IConstantInflowNFT", "name": "", "type": "address" }], "stateMutability": "view", "type": "function" }, { "inputs": [], "name": "CONSTANT_OUTFLOW_NFT_LOGIC", "outputs": [{ "internalType": "contract IConstantOutflowNFT", "name": "", "type": "address" }], "stateMutability": "view", "type": "function" }, { "inputs": [], "name": "POOL_ADMIN_NFT_LOGIC", "outputs": [{ "internalType": "contract IPoolAdminNFT", "name": "", "type": "address" }], "stateMutability": "view", "type": "function" }, { "inputs": [], "name": "POOL_MEMBER_NFT_LOGIC", "outputs": [{ "internalType": "contract IPoolMemberNFT", "name": "", "type": "address" }], "stateMutability": "view", "type": "function" }, { "inputs": [], "name": "_SUPER_TOKEN_LOGIC", "outputs": [{ "internalType": "contract ISuperToken", "name": "", "type": "address" }], "stateMutability": "view", "type": "function" }, { "inputs": [], "name": "castrate", "outputs": [], "stateMutability": "nonpayable", "type": "function" }, { "inputs": [{ "internalType": "address", "name": "_underlyingToken", "type": "address" }], "name": "computeCanonicalERC20WrapperAddress", "outputs": [{ "internalType": "address", "name": "superTokenAddress", "type": "address" }, { "internalType": "bool", "name": "isDeployed", "type": "bool" }], "stateMutability": "view", "type": "function" }, { "inputs": [{ "internalType": "contract ERC20WithTokenInfo", "name": "_underlyingToken", "type": "address" }], "name": "createCanonicalERC20Wrapper", "outputs": [{ "internalType": "contract ISuperToken", "name": "", "type": "address" }], "stateMutability": "nonpayable", "type": "function" }, { "inputs": [{ "internalType": "contract ERC20WithTokenInfo", "name": "underlyingToken", "type": "address" }, { "internalType": "enum ISuperTokenFactory.Upgradability", "name": "upgradability", "type": "uint8" }, { "internalType": "string", "name": "name", "type": "string" }, { "internalType": "string", "name": "symbol", "type": "string" }], "name": "createERC20Wrapper", "outputs": [{ "internalType": "contract ISuperToken", "name": "superToken", "type": "address" }], "stateMutability": "nonpayable", "type": "function" }, { "inputs": [{ "internalType": "contract IERC20", "name": "underlyingToken", "type": "address" }, { "internalType": "uint8", "name": "underlyingDecimals", "type": "uint8" }, { "internalType": "enum ISuperTokenFactory.Upgradability", "name": "upgradability", "type": "uint8" }, { "internalType": "string", "name": "name", "type": "string" }, { "internalType": "string", "name": "symbol", "type": "string" }], "name": "createERC20Wrapper", "outputs": [{ "internalType": "contract ISuperToken", "name": "superToken", "type": "address" }], "stateMutability": "nonpayable", "type": "function" }, { "inputs": [{ "internalType": "address", "name": "_underlyingTokenAddress", "type": "address" }], "name": "getCanonicalERC20Wrapper", "outputs": [{ "internalType": "address", "name": "superTokenAddress", "type": "address" }], "stateMutability": "view", "type": "function" }, { "inputs": [], "name": "getCodeAddress", "outputs": [{ "internalType": "address", "name": "codeAddress", "type": "address" }], "stateMutability": "view", "type": "function" }, { "inputs": [], "name": "getHost", "outputs": [{ "internalType": "address", "name": "host", "type": "address" }], "stateMutability": "view", "type": "function" }, { "inputs": [], "name": "getSuperTokenLogic", "outputs": [{ "internalType": "contract ISuperToken", "name": "", "type": "address" }], "stateMutability": "view", "type": "function" }, { "inputs": [], "name": "initialize", "outputs": [], "stateMutability": "nonpayable", "type": "function" }, { "inputs": [{ "components": [{ "internalType": "address", "name": "underlyingToken", "type": "address" }, { "internalType": "address", "name": "superToken", "type": "address" }], "internalType": "struct SuperTokenFactoryBase.InitializeData[]", "name": "_data", "type": "tuple[]" }], "name": "initializeCanonicalWrapperSuperTokens", "outputs": [], "stateMutability": "nonpayable", "type": "function" }, { "inputs": [{ "internalType": "address", "name": "customSuperTokenProxy", "type": "address" }], "name": "initializeCustomSuperToken", "outputs": [], "stateMutability": "nonpayable", "type": "function" }, { "inputs": [], "name": "proxiableUUID", "outputs": [{ "internalType": "bytes32", "name": "", "type": "bytes32" }], "stateMutability": "pure", "type": "function" }, { "inputs": [{ "internalType": "address", "name": "newAddress", "type": "address" }], "name": "updateCode", "outputs": [], "stateMutability": "nonpayable", "type": "function" }]
Expand Down Expand Up @@ -201,8 +191,6 @@ async function checkNetworkContractVerification(network) {
}
let contractsToCheck = network.contractsV1;
contractsToCheck.nativeTokenWrapper = network.nativeTokenWrapper;
contractsToCheck.wrapperToken =
networkSpecificData[network.name].wrapperTokenAddress;
contractsToCheck.superTokenLogic = await getSuperTokenLogicAddress(network)
contractsToCheck.governance = await getGovernanceAddress(network)
if (network.contractsV1.autowrap) {
Expand Down Expand Up @@ -241,15 +229,14 @@ async function checkNetworkContractVerification(network) {
async function getNetworkTokenAddressList(network) {
return new Promise((resolve, reject) => {
let response = '';
const hostName = network.subgraphV1.hostedEndpoint ? "api.thegraph.com" : "subgraph.satsuma-prod.com";
const path = network.subgraphV1.hostedEndpoint ? network.subgraphV1.hostedEndpoint.split(hostName)[1] : network.subgraphV1.satsumaEndpoint.split(hostName)[1];
const hostName = `${network.name}.subgraph.x.superfluid.dev`;
let options = {
headers: {
"Content-Type": "application/json",
"User-Agent": "Elvi.js slack bot",
},
hostname: hostName,
path: path,
path: "/",
method: "POST",
};

Expand Down

0 comments on commit 46f6d40

Please sign in to comment.