diff --git a/.openzeppelin/celo.json b/.openzeppelin/celo.json new file mode 100644 index 0000000..9fc3aa3 --- /dev/null +++ b/.openzeppelin/celo.json @@ -0,0 +1,283 @@ +{ + "manifestVersion": "3.2", + "admin": { + "address": "0xc38D6817F736b1cb44785e14A8cb7152385d3210", + "txHash": "0xff1fd14319b0800f413e7067581f5d883887a54c57ef9ea949e04205ae35b66c" + }, + "proxies": [ + { + "address": "0xF418217E3f81092eF44b81C5C8336e6A6fDB0E4b", + "txHash": "0x77b071d29651e3369d500eddb002d86cde87224e7ca967f19e28be08dd9e1a1e", + "kind": "transparent" + } + ], + "impls": { + "845d5fbd026630944b1c5aefed90760eff97550d40b8982548deafb809b1f206": { + "address": "0x8508c1C9f29BD1e73B5A9bD8FB87720927c681FA", + "txHash": "0xe480f56df0cb804c162cbaa4e35be63bf1f617c634eb5a24dd6b143405b5a0fe", + "layout": { + "solcVersion": "0.8.18", + "storage": [ + { + "label": "_initialized", + "offset": 0, + "slot": "0", + "type": "t_uint8", + "contract": "Initializable", + "src": "@openzeppelin/contracts-upgradeable/proxy/utils/Initializable.sol:63", + "retypedFrom": "bool" + }, + { + "label": "_initializing", + "offset": 1, + "slot": "0", + "type": "t_bool", + "contract": "Initializable", + "src": "@openzeppelin/contracts-upgradeable/proxy/utils/Initializable.sol:68" + }, + { + "label": "__gap", + "offset": 0, + "slot": "1", + "type": "t_array(t_uint256)50_storage", + "contract": "ContextUpgradeable", + "src": "@openzeppelin/contracts-upgradeable/utils/ContextUpgradeable.sol:40" + }, + { + "label": "_owner", + "offset": 0, + "slot": "51", + "type": "t_address", + "contract": "OwnableUpgradeable", + "src": "@openzeppelin/contracts-upgradeable/access/OwnableUpgradeable.sol:22" + }, + { + "label": "__gap", + "offset": 0, + "slot": "52", + "type": "t_array(t_uint256)49_storage", + "contract": "OwnableUpgradeable", + "src": "@openzeppelin/contracts-upgradeable/access/OwnableUpgradeable.sol:94" + }, + { + "label": "_pendingOwner", + "offset": 0, + "slot": "101", + "type": "t_address", + "contract": "Ownable2StepUpgradeable", + "src": "@openzeppelin/contracts-upgradeable/access/Ownable2StepUpgradeable.sol:21" + }, + { + "label": "__gap", + "offset": 0, + "slot": "102", + "type": "t_array(t_uint256)49_storage", + "contract": "Ownable2StepUpgradeable", + "src": "@openzeppelin/contracts-upgradeable/access/Ownable2StepUpgradeable.sol:70" + }, + { + "label": "MAX_BPS", + "offset": 0, + "slot": "151", + "type": "t_uint256", + "contract": "GatewaySettingManager", + "src": "contracts/GatewaySettingManager.sol:12" + }, + { + "label": "protocolFeePercent", + "offset": 0, + "slot": "152", + "type": "t_uint64", + "contract": "GatewaySettingManager", + "src": "contracts/GatewaySettingManager.sol:13" + }, + { + "label": "treasuryAddress", + "offset": 8, + "slot": "152", + "type": "t_address", + "contract": "GatewaySettingManager", + "src": "contracts/GatewaySettingManager.sol:14" + }, + { + "label": "_aggregatorAddress", + "offset": 0, + "slot": "153", + "type": "t_address", + "contract": "GatewaySettingManager", + "src": "contracts/GatewaySettingManager.sol:15" + }, + { + "label": "_isTokenSupported", + "offset": 0, + "slot": "154", + "type": "t_mapping(t_address,t_uint256)", + "contract": "GatewaySettingManager", + "src": "contracts/GatewaySettingManager.sol:16" + }, + { + "label": "__gap", + "offset": 0, + "slot": "155", + "type": "t_array(t_uint256)50_storage", + "contract": "GatewaySettingManager", + "src": "contracts/GatewaySettingManager.sol:19" + }, + { + "label": "_paused", + "offset": 0, + "slot": "205", + "type": "t_bool", + "contract": "PausableUpgradeable", + "src": "@openzeppelin/contracts-upgradeable/security/PausableUpgradeable.sol:29" + }, + { + "label": "__gap", + "offset": 0, + "slot": "206", + "type": "t_array(t_uint256)49_storage", + "contract": "PausableUpgradeable", + "src": "@openzeppelin/contracts-upgradeable/security/PausableUpgradeable.sol:116" + }, + { + "label": "order", + "offset": 0, + "slot": "255", + "type": "t_mapping(t_bytes32,t_struct(Order)2469_storage)", + "contract": "Gateway", + "src": "contracts/Gateway.sol:19" + }, + { + "label": "_nonce", + "offset": 0, + "slot": "256", + "type": "t_mapping(t_address,t_uint256)", + "contract": "Gateway", + "src": "contracts/Gateway.sol:20" + }, + { + "label": "__gap", + "offset": 0, + "slot": "257", + "type": "t_array(t_uint256)50_storage", + "contract": "Gateway", + "src": "contracts/Gateway.sol:21" + } + ], + "types": { + "t_address": { + "label": "address", + "numberOfBytes": "20" + }, + "t_array(t_uint256)49_storage": { + "label": "uint256[49]", + "numberOfBytes": "1568" + }, + "t_array(t_uint256)50_storage": { + "label": "uint256[50]", + "numberOfBytes": "1600" + }, + "t_bool": { + "label": "bool", + "numberOfBytes": "1" + }, + "t_bytes32": { + "label": "bytes32", + "numberOfBytes": "32" + }, + "t_mapping(t_address,t_uint256)": { + "label": "mapping(address => uint256)", + "numberOfBytes": "32" + }, + "t_mapping(t_bytes32,t_struct(Order)2469_storage)": { + "label": "mapping(bytes32 => struct IGateway.Order)", + "numberOfBytes": "32" + }, + "t_struct(Order)2469_storage": { + "label": "struct IGateway.Order", + "members": [ + { + "label": "sender", + "type": "t_address", + "offset": 0, + "slot": "0" + }, + { + "label": "token", + "type": "t_address", + "offset": 0, + "slot": "1" + }, + { + "label": "senderFeeRecipient", + "type": "t_address", + "offset": 0, + "slot": "2" + }, + { + "label": "senderFee", + "type": "t_uint256", + "offset": 0, + "slot": "3" + }, + { + "label": "protocolFee", + "type": "t_uint256", + "offset": 0, + "slot": "4" + }, + { + "label": "isFulfilled", + "type": "t_bool", + "offset": 0, + "slot": "5" + }, + { + "label": "isRefunded", + "type": "t_bool", + "offset": 1, + "slot": "5" + }, + { + "label": "refundAddress", + "type": "t_address", + "offset": 2, + "slot": "5" + }, + { + "label": "currentBPS", + "type": "t_uint96", + "offset": 0, + "slot": "6" + }, + { + "label": "amount", + "type": "t_uint256", + "offset": 0, + "slot": "7" + } + ], + "numberOfBytes": "256" + }, + "t_uint256": { + "label": "uint256", + "numberOfBytes": "32" + }, + "t_uint64": { + "label": "uint64", + "numberOfBytes": "8" + }, + "t_uint8": { + "label": "uint8", + "numberOfBytes": "1" + }, + "t_uint96": { + "label": "uint96", + "numberOfBytes": "12" + } + }, + "namespaces": {} + } + } + } +} diff --git a/.openzeppelin/unknown-42420.json b/.openzeppelin/unknown-42420.json new file mode 100644 index 0000000..fc80ece --- /dev/null +++ b/.openzeppelin/unknown-42420.json @@ -0,0 +1,283 @@ +{ + "manifestVersion": "3.2", + "admin": { + "address": "0x8FD1f78d88Dd008E557273b5Cd517487C2A9A7de", + "txHash": "0x0af691605b219065d51db5f2bef9ad10eb5696535ce60b858dec7d9fd03c3518" + }, + "proxies": [ + { + "address": "0xff0E00E0110C1FBb5315D276243497b66D3a4d8a", + "txHash": "0x5060ef7aebb70f94c87ec82b480b0d659824fa237aec9c5c6e9d2fb0ca3b79b9", + "kind": "transparent" + } + ], + "impls": { + "8689ffc4c401435f48792097adca219ffd47d52aa60869b4623055b9563f9927": { + "address": "0x3Dc80272cE93cBFF3351913bB089B59C4a9141DE", + "txHash": "0xbebbb0ff7a02864d0d1bb39df90946ce270d34fd214fcffd90ee7a1c72b7e3b6", + "layout": { + "solcVersion": "0.8.18", + "storage": [ + { + "label": "_initialized", + "offset": 0, + "slot": "0", + "type": "t_uint8", + "contract": "Initializable", + "src": "@openzeppelin/contracts-upgradeable/proxy/utils/Initializable.sol:63", + "retypedFrom": "bool" + }, + { + "label": "_initializing", + "offset": 1, + "slot": "0", + "type": "t_bool", + "contract": "Initializable", + "src": "@openzeppelin/contracts-upgradeable/proxy/utils/Initializable.sol:68" + }, + { + "label": "__gap", + "offset": 0, + "slot": "1", + "type": "t_array(t_uint256)50_storage", + "contract": "ContextUpgradeable", + "src": "@openzeppelin/contracts-upgradeable/utils/ContextUpgradeable.sol:40" + }, + { + "label": "_owner", + "offset": 0, + "slot": "51", + "type": "t_address", + "contract": "OwnableUpgradeable", + "src": "@openzeppelin/contracts-upgradeable/access/OwnableUpgradeable.sol:22" + }, + { + "label": "__gap", + "offset": 0, + "slot": "52", + "type": "t_array(t_uint256)49_storage", + "contract": "OwnableUpgradeable", + "src": "@openzeppelin/contracts-upgradeable/access/OwnableUpgradeable.sol:94" + }, + { + "label": "_pendingOwner", + "offset": 0, + "slot": "101", + "type": "t_address", + "contract": "Ownable2StepUpgradeable", + "src": "@openzeppelin/contracts-upgradeable/access/Ownable2StepUpgradeable.sol:21" + }, + { + "label": "__gap", + "offset": 0, + "slot": "102", + "type": "t_array(t_uint256)49_storage", + "contract": "Ownable2StepUpgradeable", + "src": "@openzeppelin/contracts-upgradeable/access/Ownable2StepUpgradeable.sol:70" + }, + { + "label": "MAX_BPS", + "offset": 0, + "slot": "151", + "type": "t_uint256", + "contract": "GatewaySettingManager", + "src": "contracts/GatewaySettingManager.sol:12" + }, + { + "label": "protocolFeePercent", + "offset": 0, + "slot": "152", + "type": "t_uint64", + "contract": "GatewaySettingManager", + "src": "contracts/GatewaySettingManager.sol:13" + }, + { + "label": "treasuryAddress", + "offset": 8, + "slot": "152", + "type": "t_address", + "contract": "GatewaySettingManager", + "src": "contracts/GatewaySettingManager.sol:14" + }, + { + "label": "_aggregatorAddress", + "offset": 0, + "slot": "153", + "type": "t_address", + "contract": "GatewaySettingManager", + "src": "contracts/GatewaySettingManager.sol:15" + }, + { + "label": "_isTokenSupported", + "offset": 0, + "slot": "154", + "type": "t_mapping(t_address,t_uint256)", + "contract": "GatewaySettingManager", + "src": "contracts/GatewaySettingManager.sol:16" + }, + { + "label": "__gap", + "offset": 0, + "slot": "155", + "type": "t_array(t_uint256)50_storage", + "contract": "GatewaySettingManager", + "src": "contracts/GatewaySettingManager.sol:19" + }, + { + "label": "_paused", + "offset": 0, + "slot": "205", + "type": "t_bool", + "contract": "PausableUpgradeable", + "src": "@openzeppelin/contracts-upgradeable/security/PausableUpgradeable.sol:29" + }, + { + "label": "__gap", + "offset": 0, + "slot": "206", + "type": "t_array(t_uint256)49_storage", + "contract": "PausableUpgradeable", + "src": "@openzeppelin/contracts-upgradeable/security/PausableUpgradeable.sol:116" + }, + { + "label": "order", + "offset": 0, + "slot": "255", + "type": "t_mapping(t_bytes32,t_struct(Order)1824_storage)", + "contract": "Gateway", + "src": "contracts/Gateway.sol:19" + }, + { + "label": "_nonce", + "offset": 0, + "slot": "256", + "type": "t_mapping(t_address,t_uint256)", + "contract": "Gateway", + "src": "contracts/Gateway.sol:20" + }, + { + "label": "__gap", + "offset": 0, + "slot": "257", + "type": "t_array(t_uint256)50_storage", + "contract": "Gateway", + "src": "contracts/Gateway.sol:21" + } + ], + "types": { + "t_address": { + "label": "address", + "numberOfBytes": "20" + }, + "t_array(t_uint256)49_storage": { + "label": "uint256[49]", + "numberOfBytes": "1568" + }, + "t_array(t_uint256)50_storage": { + "label": "uint256[50]", + "numberOfBytes": "1600" + }, + "t_bool": { + "label": "bool", + "numberOfBytes": "1" + }, + "t_bytes32": { + "label": "bytes32", + "numberOfBytes": "32" + }, + "t_mapping(t_address,t_uint256)": { + "label": "mapping(address => uint256)", + "numberOfBytes": "32" + }, + "t_mapping(t_bytes32,t_struct(Order)1824_storage)": { + "label": "mapping(bytes32 => struct IGateway.Order)", + "numberOfBytes": "32" + }, + "t_struct(Order)1824_storage": { + "label": "struct IGateway.Order", + "members": [ + { + "label": "sender", + "type": "t_address", + "offset": 0, + "slot": "0" + }, + { + "label": "token", + "type": "t_address", + "offset": 0, + "slot": "1" + }, + { + "label": "senderFeeRecipient", + "type": "t_address", + "offset": 0, + "slot": "2" + }, + { + "label": "senderFee", + "type": "t_uint256", + "offset": 0, + "slot": "3" + }, + { + "label": "protocolFee", + "type": "t_uint256", + "offset": 0, + "slot": "4" + }, + { + "label": "isFulfilled", + "type": "t_bool", + "offset": 0, + "slot": "5" + }, + { + "label": "isRefunded", + "type": "t_bool", + "offset": 1, + "slot": "5" + }, + { + "label": "refundAddress", + "type": "t_address", + "offset": 2, + "slot": "5" + }, + { + "label": "currentBPS", + "type": "t_uint96", + "offset": 0, + "slot": "6" + }, + { + "label": "amount", + "type": "t_uint256", + "offset": 0, + "slot": "7" + } + ], + "numberOfBytes": "256" + }, + "t_uint256": { + "label": "uint256", + "numberOfBytes": "32" + }, + "t_uint64": { + "label": "uint64", + "numberOfBytes": "8" + }, + "t_uint8": { + "label": "uint8", + "numberOfBytes": "1" + }, + "t_uint96": { + "label": "uint96", + "numberOfBytes": "12" + } + }, + "namespaces": {} + } + } + } +} diff --git a/.openzeppelin/unknown-42421.json b/.openzeppelin/unknown-42421.json new file mode 100644 index 0000000..2b6b9bd --- /dev/null +++ b/.openzeppelin/unknown-42421.json @@ -0,0 +1,283 @@ +{ + "manifestVersion": "3.2", + "admin": { + "address": "0x3bECd7DD69DcDe95d03a1e27d93ea9D9f8c06708", + "txHash": "0xc9c7eefad983da68fad0338b447cfc925b1bd508f762467a9ffa574c18cd0360" + }, + "proxies": [ + { + "address": "0xBe6dE889795677736919A7880324A71Dc7dFa162", + "txHash": "0xb0bec39077a8a67df2f0f61830a56677017fac026009ff11576faec0340fd699", + "kind": "transparent" + } + ], + "impls": { + "845d5fbd026630944b1c5aefed90760eff97550d40b8982548deafb809b1f206": { + "address": "0x9519D63fbF9717Fa3419846eBA92B01Cd1d1D131", + "txHash": "0xf9b53fde29323110e1f3c1a75362c6ac682010e863587dd6607b56a7190babb5", + "layout": { + "solcVersion": "0.8.18", + "storage": [ + { + "label": "_initialized", + "offset": 0, + "slot": "0", + "type": "t_uint8", + "contract": "Initializable", + "src": "@openzeppelin/contracts-upgradeable/proxy/utils/Initializable.sol:63", + "retypedFrom": "bool" + }, + { + "label": "_initializing", + "offset": 1, + "slot": "0", + "type": "t_bool", + "contract": "Initializable", + "src": "@openzeppelin/contracts-upgradeable/proxy/utils/Initializable.sol:68" + }, + { + "label": "__gap", + "offset": 0, + "slot": "1", + "type": "t_array(t_uint256)50_storage", + "contract": "ContextUpgradeable", + "src": "@openzeppelin/contracts-upgradeable/utils/ContextUpgradeable.sol:40" + }, + { + "label": "_owner", + "offset": 0, + "slot": "51", + "type": "t_address", + "contract": "OwnableUpgradeable", + "src": "@openzeppelin/contracts-upgradeable/access/OwnableUpgradeable.sol:22" + }, + { + "label": "__gap", + "offset": 0, + "slot": "52", + "type": "t_array(t_uint256)49_storage", + "contract": "OwnableUpgradeable", + "src": "@openzeppelin/contracts-upgradeable/access/OwnableUpgradeable.sol:94" + }, + { + "label": "_pendingOwner", + "offset": 0, + "slot": "101", + "type": "t_address", + "contract": "Ownable2StepUpgradeable", + "src": "@openzeppelin/contracts-upgradeable/access/Ownable2StepUpgradeable.sol:21" + }, + { + "label": "__gap", + "offset": 0, + "slot": "102", + "type": "t_array(t_uint256)49_storage", + "contract": "Ownable2StepUpgradeable", + "src": "@openzeppelin/contracts-upgradeable/access/Ownable2StepUpgradeable.sol:70" + }, + { + "label": "MAX_BPS", + "offset": 0, + "slot": "151", + "type": "t_uint256", + "contract": "GatewaySettingManager", + "src": "contracts/GatewaySettingManager.sol:12" + }, + { + "label": "protocolFeePercent", + "offset": 0, + "slot": "152", + "type": "t_uint64", + "contract": "GatewaySettingManager", + "src": "contracts/GatewaySettingManager.sol:13" + }, + { + "label": "treasuryAddress", + "offset": 8, + "slot": "152", + "type": "t_address", + "contract": "GatewaySettingManager", + "src": "contracts/GatewaySettingManager.sol:14" + }, + { + "label": "_aggregatorAddress", + "offset": 0, + "slot": "153", + "type": "t_address", + "contract": "GatewaySettingManager", + "src": "contracts/GatewaySettingManager.sol:15" + }, + { + "label": "_isTokenSupported", + "offset": 0, + "slot": "154", + "type": "t_mapping(t_address,t_uint256)", + "contract": "GatewaySettingManager", + "src": "contracts/GatewaySettingManager.sol:16" + }, + { + "label": "__gap", + "offset": 0, + "slot": "155", + "type": "t_array(t_uint256)50_storage", + "contract": "GatewaySettingManager", + "src": "contracts/GatewaySettingManager.sol:19" + }, + { + "label": "_paused", + "offset": 0, + "slot": "205", + "type": "t_bool", + "contract": "PausableUpgradeable", + "src": "@openzeppelin/contracts-upgradeable/security/PausableUpgradeable.sol:29" + }, + { + "label": "__gap", + "offset": 0, + "slot": "206", + "type": "t_array(t_uint256)49_storage", + "contract": "PausableUpgradeable", + "src": "@openzeppelin/contracts-upgradeable/security/PausableUpgradeable.sol:116" + }, + { + "label": "order", + "offset": 0, + "slot": "255", + "type": "t_mapping(t_bytes32,t_struct(Order)1827_storage)", + "contract": "Gateway", + "src": "contracts/Gateway.sol:19" + }, + { + "label": "_nonce", + "offset": 0, + "slot": "256", + "type": "t_mapping(t_address,t_uint256)", + "contract": "Gateway", + "src": "contracts/Gateway.sol:20" + }, + { + "label": "__gap", + "offset": 0, + "slot": "257", + "type": "t_array(t_uint256)50_storage", + "contract": "Gateway", + "src": "contracts/Gateway.sol:21" + } + ], + "types": { + "t_address": { + "label": "address", + "numberOfBytes": "20" + }, + "t_array(t_uint256)49_storage": { + "label": "uint256[49]", + "numberOfBytes": "1568" + }, + "t_array(t_uint256)50_storage": { + "label": "uint256[50]", + "numberOfBytes": "1600" + }, + "t_bool": { + "label": "bool", + "numberOfBytes": "1" + }, + "t_bytes32": { + "label": "bytes32", + "numberOfBytes": "32" + }, + "t_mapping(t_address,t_uint256)": { + "label": "mapping(address => uint256)", + "numberOfBytes": "32" + }, + "t_mapping(t_bytes32,t_struct(Order)1827_storage)": { + "label": "mapping(bytes32 => struct IGateway.Order)", + "numberOfBytes": "32" + }, + "t_struct(Order)1827_storage": { + "label": "struct IGateway.Order", + "members": [ + { + "label": "sender", + "type": "t_address", + "offset": 0, + "slot": "0" + }, + { + "label": "token", + "type": "t_address", + "offset": 0, + "slot": "1" + }, + { + "label": "senderFeeRecipient", + "type": "t_address", + "offset": 0, + "slot": "2" + }, + { + "label": "senderFee", + "type": "t_uint256", + "offset": 0, + "slot": "3" + }, + { + "label": "protocolFee", + "type": "t_uint256", + "offset": 0, + "slot": "4" + }, + { + "label": "isFulfilled", + "type": "t_bool", + "offset": 0, + "slot": "5" + }, + { + "label": "isRefunded", + "type": "t_bool", + "offset": 1, + "slot": "5" + }, + { + "label": "refundAddress", + "type": "t_address", + "offset": 2, + "slot": "5" + }, + { + "label": "currentBPS", + "type": "t_uint96", + "offset": 0, + "slot": "6" + }, + { + "label": "amount", + "type": "t_uint256", + "offset": 0, + "slot": "7" + } + ], + "numberOfBytes": "256" + }, + "t_uint256": { + "label": "uint256", + "numberOfBytes": "32" + }, + "t_uint64": { + "label": "uint64", + "numberOfBytes": "8" + }, + "t_uint8": { + "label": "uint8", + "numberOfBytes": "1" + }, + "t_uint96": { + "label": "uint96", + "numberOfBytes": "12" + } + }, + "namespaces": {} + } + } + } +} diff --git a/README.md b/README.md index 5393649..79dfa0b 100644 --- a/README.md +++ b/README.md @@ -115,6 +115,18 @@ npx hardhat run scripts/tron/updateProtocolFee.ts + + Asset Chain Testnet + Gateway Proxy + 0xBe6dE889795677736919A7880324A71Dc7dFa162 + + + Gateway Implementation + 0x9519D63fbF9717Fa3419846eBA92B01Cd1d1D131 + + + + Tron Shasta Gateway Proxy @@ -234,6 +246,31 @@ npx hardhat run scripts/tron/updateProtocolFee.ts + + Celo + Gateway Proxy + 0xF418217E3f81092eF44b81C5C8336e6A6fDB0E4b + + + Gateway Implementation + 0x8508c1C9f29BD1e73B5A9bD8FB87720927c681FA + + + Gateway Admin + 0xc38D6817F736b1cb44785e14A8cb7152385d3210 + + + Asset Chain + Gateway Proxy + 0xff0E00E0110C1FBb5315D276243497b66D3a4d8a + + + Gateway Implementation + 0x3Dc80272cE93cBFF3351913bB089B59C4a9141DE + + + + Tron Gateway Proxy diff --git a/hardhat.config.ts b/hardhat.config.ts index c51963a..d39ceef 100644 --- a/hardhat.config.ts +++ b/hardhat.config.ts @@ -21,6 +21,7 @@ let { POLYGONSCAN_API_KEY, OPTIMISM_API, SCROLL_API, + CELO_API, } = process.env; const testPrivateKey = "0000000000000000000000000000000000000000000000000000000000000001" @@ -75,6 +76,18 @@ const config: HardhatUserConfig = { chainId: 534352, saveDeployments: true, }, + celo: { + url: "https://forno.celo.org", // @note this is a public rpc + accounts: [DEPLOYER_PRIVATE_KEY || testPrivateKey], + chainId: 42220, + saveDeployments: true, + }, + assetChain: { + url: "https://mainnet-rpc.assetchain.org", // @note this is a public rpc + accounts: [DEPLOYER_PRIVATE_KEY || testPrivateKey], + chainId: 42420, + saveDeployments: true, + }, // Testnets arbitrumSepolia: { @@ -102,6 +115,12 @@ const config: HardhatUserConfig = { chainId: 11155111, saveDeployments: true, }, + assetchain_test: { + url: "https://enugu-rpc.assetchain.org/", // @note this is a public rpc + accounts: [DEPLOYER_PRIVATE_KEY || testPrivateKey], + chainId: 42421, + saveDeployments: true, + }, }, solidity: { settings: { @@ -134,6 +153,7 @@ const config: HardhatUserConfig = { sepolia: ETHERSCAN_API_KEY!, optimisticEthereum: OPTIMISM_API!, scroll: SCROLL_API!, + celo: CELO_API!, }, customChains: [ { @@ -176,6 +196,22 @@ const config: HardhatUserConfig = { browserURL: "https://amoy.polygonscan.com", }, }, + { + network: "celo", + chainId: 42220, + urls: { + apiURL: "https://api.celoscan.io/api", + browserURL: "https://celoscan.io/", + }, + }, + { + network: "assetchain_test", + chainId: 42421, + urls: { + apiURL: "https://scan-testnet.assetchain.org/api", + browserURL: "https://scan-testnet.assetchain.org/", + }, + }, ], }, }; diff --git a/scripts/config.ts b/scripts/config.ts index 2d61000..b48f53b 100644 --- a/scripts/config.ts +++ b/scripts/config.ts @@ -118,6 +118,32 @@ const NETWORKS = { TREASURY_FEE_PERCENT: 100, // in BPS i.e 0.1% GATEWAY_CONTRACT: "THyFP5ST9YyLZn6EzjKjFhZti6aKPgEXNU", }, + /** + * @dev Celo Mainnet + */ + 42220: { + GATEWAY_IMPLEMENTATION: "0x8508c1C9f29BD1e73B5A9bD8FB87720927c681FA", + RPC_URL: `https://forno.celo.org`, + SUPPORTED_TOKENS: { + USDC: "0xcebA9300f2b948710d2653dD7B07f33A8B32118C", + }, + TREASURY_FEE_PERCENT: 100, // in BPS i.e 0.1% + GATEWAY_CONTRACT: "0xF418217E3f81092eF44b81C5C8336e6A6fDB0E4b", + IMPERSONATE_ACCOUNT: "", + }, + /** + * @dev AssetChain Mainnet + */ + 42420: { + RPC_URL: `https://mainnet-rpc.assetchain.org`, + GATEWAY_IMPLEMENTATION: "0x3Dc80272cE93cBFF3351913bB089B59C4a9141DE", + SUPPORTED_TOKENS: { + USDC: "0x2B7C1342Cc64add10B2a79C8f9767d2667DE64B2", + }, + TREASURY_FEE_PERCENT: 100, // in BPS i.e 0.1% + GATEWAY_CONTRACT: "0xff0E00E0110C1FBb5315D276243497b66D3a4d8a", + IMPERSONATE_ACCOUNT: "", + }, ///////////////////////////////// // Testnets @@ -191,6 +217,19 @@ const NETWORKS = { TREASURY_FEE_PERCENT: 100, // in BPS i.e 0.1% GATEWAY_CONTRACT: "TYA8urq7nkN2yU7rJqAgwDShCusDZrrsxZ", }, + /** + * @dev AssetChain Testnet + */ + 42421: { + GATEWAY_IMPLEMENTATION: "0x9519D63fbF9717Fa3419846eBA92B01Cd1d1D131", + RPC_URL: `https://enugu-rpc.assetchain.org/`, + SUPPORTED_TOKENS: { + USDC: "0x04f868C5b3F0A100a207c7e9312946cC2c48a7a3", + }, + TREASURY_FEE_PERCENT: 100, // in BPS i.e 0.1% + GATEWAY_CONTRACT: "0xBe6dE889795677736919A7880324A71Dc7dFa162", + IMPERSONATE_ACCOUNT: "", + }, }; export { NETWORKS }; diff --git a/test/gateway/gateway.createorder.test.js b/test/gateway/gateway.createorder.test.js index 3ca52af..176a1d7 100644 --- a/test/gateway/gateway.createorder.test.js +++ b/test/gateway/gateway.createorder.test.js @@ -126,7 +126,7 @@ describe("Gateway create order", function () { ) .to.emit(this.gateway, Events.Gateway.OrderCreated) .withArgs( - this.alice.address, + this.sender.address, this.mockUSDT.address, BigNumber.from(this.orderAmount), this.protocolFee,