├── .github └── workflows │ └── ci.yaml ├── .gitignore ├── AnyswapV4ERC20.sol ├── AnyswapV5ERC20.sol ├── LICENSE ├── README.md ├── amarokGlobal.json ├── chains.json ├── config ├── cloudfront.tf ├── outputs.tf ├── route53.tf ├── s3.tf └── variables.tf ├── crossChain.json ├── deploy.js ├── deploy.md ├── everclear.json ├── everclear.mainnet.staging.json ├── everclear.testnet.json ├── everclear.testnet.staging.json ├── main.tf ├── outputs.tf ├── package-lock.json └── package.json /.github/workflows/ci.yaml: -------------------------------------------------------------------------------- 1 | name: Deploy S3 Assets 2 | 3 | on: 4 | push: 5 | branches: [main] 6 | 7 | jobs: 8 | terraform-deploy-assets: 9 | env: 10 | CF_DISTRIBUTION_ID: E1W1OZ8FEAK8E7 11 | runs-on: ubuntu-latest 12 | name: Deploy file to s3 + cloudfront 13 | steps: 14 | - name: Checkout 15 | uses: actions/checkout@master 16 | 17 | - name: Configure AWS Credentials 18 | uses: aws-actions/configure-aws-credentials@v1 19 | with: 20 | aws-access-key-id: ${{ secrets.AWS_ACCESS_KEY_ID }} 21 | aws-secret-access-key: ${{ secrets.AWS_SECRET_ACCESS_KEY }} 22 | aws-region: us-east-2 23 | 24 | - name: Filter empty domain ids 25 | run: cat crossChain.json | jq 'del(.[] | select(.chainId == null))' > crossChain.tmp && mv -f crossChain.tmp crossChain.json 26 | 27 | - name: Setup Terraform 28 | uses: hashicorp/setup-terraform@v1 29 | with: 30 | terraform_version: 1.5.7 31 | 32 | - name: Terraform Plan 33 | run: terraform init 34 | 35 | - name: Terraform Plan 36 | run: terraform plan 37 | 38 | - name: Terraform Deploy 39 | run: terraform apply -auto-approve 40 | 41 | - name: Invalidate Cloudfront Distribution 42 | run: aws cloudfront create-invalidation --distribution-id $CF_DISTRIBUTION_ID --paths '/chaindata.json' 43 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | node_modules 2 | **/.terraform/** 3 | **/.terraform.lock.hcl 4 | terraform.tfstate* -------------------------------------------------------------------------------- /AnyswapV4ERC20.sol: -------------------------------------------------------------------------------- 1 | // SPDX-License-Identifier: GPL-3.0-or-later 2 | 3 | pragma solidity 0.8.2; 4 | 5 | /** 6 | * @dev Interface of the ERC20 standard as defined in the EIP. 7 | */ 8 | interface IERC20 { 9 | function totalSupply() external view returns (uint256); 10 | function decimals() external view returns (uint8); 11 | function balanceOf(address account) external view returns (uint256); 12 | function transfer(address recipient, uint256 amount) external returns (bool); 13 | function allowance(address owner, address spender) external view returns (uint256); 14 | function approve(address spender, uint256 amount) external returns (bool); 15 | function transferFrom(address sender, address recipient, uint256 amount) external returns (bool); 16 | function permit(address target, address spender, uint256 value, uint256 deadline, uint8 v, bytes32 r, bytes32 s) external; 17 | function transferWithPermit(address target, address to, uint256 value, uint256 deadline, uint8 v, bytes32 r, bytes32 s) external returns (bool); 18 | event Transfer(address indexed from, address indexed to, uint256 value); 19 | event Approval(address indexed owner, address indexed spender, uint256 value); 20 | } 21 | 22 | /** 23 | * @dev Interface of the ERC2612 standard as defined in the EIP. 24 | * 25 | * Adds the {permit} method, which can be used to change one's 26 | * {IERC20-allowance} without having to send a transaction, by signing a 27 | * message. This allows users to spend tokens without having to hold Ether. 28 | * 29 | * See https://eips.ethereum.org/EIPS/eip-2612. 30 | */ 31 | interface IERC2612 { 32 | 33 | /** 34 | * @dev Returns the current ERC2612 nonce for `owner`. This value must be 35 | * included whenever a signature is generated for {permit}. 36 | * 37 | * Every successful call to {permit} increases ``owner``'s nonce by one. This 38 | * prevents a signature from being used multiple times. 39 | */ 40 | function nonces(address owner) external view returns (uint256); 41 | } 42 | 43 | /// @dev Wrapped ERC-20 v10 (AnyswapV3ERC20) is an ERC-20 ERC-20 wrapper. You can `deposit` ERC-20 and obtain an AnyswapV3ERC20 balance which can then be operated as an ERC-20 token. You can 44 | /// `withdraw` ERC-20 from AnyswapV3ERC20, which will then burn AnyswapV3ERC20 token in your wallet. The amount of AnyswapV3ERC20 token in any wallet is always identical to the 45 | /// balance of ERC-20 deposited minus the ERC-20 withdrawn with that specific wallet. 46 | interface IAnyswapV3ERC20 is IERC20, IERC2612 { 47 | 48 | /// @dev Sets `value` as allowance of `spender` account over caller account's AnyswapV3ERC20 token, 49 | /// after which a call is executed to an ERC677-compliant contract with the `data` parameter. 50 | /// Emits {Approval} event. 51 | /// Returns boolean value indicating whether operation succeeded. 52 | /// For more information on approveAndCall format, see https://github.com/ethereum/EIPs/issues/677. 53 | function approveAndCall(address spender, uint256 value, bytes calldata data) external returns (bool); 54 | 55 | /// @dev Moves `value` AnyswapV3ERC20 token from caller's account to account (`to`), 56 | /// after which a call is executed to an ERC677-compliant contract with the `data` parameter. 57 | /// A transfer to `address(0)` triggers an ERC-20 withdraw matching the sent AnyswapV3ERC20 token in favor of caller. 58 | /// Emits {Transfer} event. 59 | /// Returns boolean value indicating whether operation succeeded. 60 | /// Requirements: 61 | /// - caller account must have at least `value` AnyswapV3ERC20 token. 62 | /// For more information on transferAndCall format, see https://github.com/ethereum/EIPs/issues/677. 63 | function transferAndCall(address to, uint value, bytes calldata data) external returns (bool); 64 | } 65 | 66 | interface ITransferReceiver { 67 | function onTokenTransfer(address, uint, bytes calldata) external returns (bool); 68 | } 69 | 70 | interface IApprovalReceiver { 71 | function onTokenApproval(address, uint, bytes calldata) external returns (bool); 72 | } 73 | 74 | library Address { 75 | function isContract(address account) internal view returns (bool) { 76 | bytes32 codehash; 77 | bytes32 accountHash = 0xc5d2460186f7233c927e7db2dcc703c0e500b653ca82273b7bfad8045d85a470; 78 | // solhint-disable-next-line no-inline-assembly 79 | assembly { codehash := extcodehash(account) } 80 | return (codehash != 0x0 && codehash != accountHash); 81 | } 82 | } 83 | 84 | library SafeERC20 { 85 | using Address for address; 86 | 87 | function safeTransfer(IERC20 token, address to, uint value) internal { 88 | callOptionalReturn(token, abi.encodeWithSelector(token.transfer.selector, to, value)); 89 | } 90 | 91 | function safeTransferFrom(IERC20 token, address from, address to, uint value) internal { 92 | callOptionalReturn(token, abi.encodeWithSelector(token.transferFrom.selector, from, to, value)); 93 | } 94 | 95 | function safeApprove(IERC20 token, address spender, uint value) internal { 96 | require((value == 0) || (token.allowance(address(this), spender) == 0), 97 | "SafeERC20: approve from non-zero to non-zero allowance" 98 | ); 99 | callOptionalReturn(token, abi.encodeWithSelector(token.approve.selector, spender, value)); 100 | } 101 | function callOptionalReturn(IERC20 token, bytes memory data) private { 102 | require(address(token).isContract(), "SafeERC20: call to non-contract"); 103 | 104 | // solhint-disable-next-line avoid-low-level-calls 105 | (bool success, bytes memory returndata) = address(token).call(data); 106 | require(success, "SafeERC20: low-level call failed"); 107 | 108 | if (returndata.length > 0) { // Return data is optional 109 | // solhint-disable-next-line max-line-length 110 | require(abi.decode(returndata, (bool)), "SafeERC20: ERC20 operation did not succeed"); 111 | } 112 | } 113 | } 114 | 115 | contract AnyswapV4ERC20 is IAnyswapV3ERC20 { 116 | using SafeERC20 for IERC20; 117 | string public name; 118 | string public symbol; 119 | uint8 public immutable override decimals; 120 | 121 | address public immutable underlying; 122 | 123 | bytes32 public constant PERMIT_TYPEHASH = keccak256("Permit(address owner,address spender,uint256 value,uint256 nonce,uint256 deadline)"); 124 | bytes32 public constant TRANSFER_TYPEHASH = keccak256("Transfer(address owner,address to,uint256 value,uint256 nonce,uint256 deadline)"); 125 | bytes32 public immutable DOMAIN_SEPARATOR; 126 | 127 | /// @dev Records amount of AnyswapV3ERC20 token owned by account. 128 | mapping (address => uint256) public override balanceOf; 129 | uint256 private _totalSupply; 130 | 131 | // init flag for setting immediate vault, needed for CREATE2 support 132 | bool private _init; 133 | 134 | // flag to enable/disable swapout vs vault.burn so multiple events are triggered 135 | bool private _vaultOnly; 136 | 137 | // configurable delay for timelock functions 138 | uint public delay = 2*24*3600; 139 | 140 | 141 | // set of minters, can be this bridge or other bridges 142 | mapping(address => bool) public isMinter; 143 | address[] public minters; 144 | 145 | // primary controller of the token contract 146 | address public vault; 147 | 148 | address public pendingMinter; 149 | uint public delayMinter; 150 | 151 | address public pendingVault; 152 | uint public delayVault; 153 | 154 | uint public pendingDelay; 155 | uint public delayDelay; 156 | 157 | 158 | modifier onlyAuth() { 159 | require(isMinter[msg.sender], "AnyswapV4ERC20: FORBIDDEN"); 160 | _; 161 | } 162 | 163 | modifier onlyVault() { 164 | require(msg.sender == mpc(), "AnyswapV3ERC20: FORBIDDEN"); 165 | _; 166 | } 167 | 168 | function owner() public view returns (address) { 169 | return mpc(); 170 | } 171 | 172 | function mpc() public view returns (address) { 173 | if (block.timestamp >= delayVault) { 174 | return pendingVault; 175 | } 176 | return vault; 177 | } 178 | 179 | function setVaultOnly(bool enabled) external onlyVault { 180 | _vaultOnly = enabled; 181 | } 182 | 183 | function initVault(address _vault) external onlyVault { 184 | require(_init); 185 | vault = _vault; 186 | pendingVault = _vault; 187 | isMinter[_vault] = true; 188 | minters.push(_vault); 189 | delayVault = block.timestamp; 190 | _init = false; 191 | } 192 | 193 | function setMinter(address _auth) external onlyVault { 194 | pendingMinter = _auth; 195 | delayMinter = block.timestamp + delay; 196 | } 197 | 198 | function setVault(address _vault) external onlyVault { 199 | pendingVault = _vault; 200 | delayVault = block.timestamp + delay; 201 | } 202 | 203 | function applyVault() external onlyVault { 204 | require(block.timestamp >= delayVault); 205 | vault = pendingVault; 206 | } 207 | 208 | function applyMinter() external onlyVault { 209 | require(block.timestamp >= delayMinter); 210 | isMinter[pendingMinter] = true; 211 | minters.push(pendingMinter); 212 | } 213 | 214 | // No time delay revoke minter emergency function 215 | function revokeMinter(address _auth) external onlyVault { 216 | isMinter[_auth] = false; 217 | } 218 | 219 | function getAllMinters() external view returns (address[] memory) { 220 | return minters; 221 | } 222 | 223 | 224 | function changeVault(address newVault) external onlyVault returns (bool) { 225 | require(newVault != address(0), "AnyswapV3ERC20: address(0x0)"); 226 | pendingVault = newVault; 227 | delayVault = block.timestamp + delay; 228 | emit LogChangeVault(vault, pendingVault, delayVault); 229 | return true; 230 | } 231 | 232 | function changeMPCOwner(address newVault) public onlyVault returns (bool) { 233 | require(newVault != address(0), "AnyswapV3ERC20: address(0x0)"); 234 | pendingVault = newVault; 235 | delayVault = block.timestamp + delay; 236 | emit LogChangeMPCOwner(vault, pendingVault, delayVault); 237 | return true; 238 | } 239 | 240 | function mint(address to, uint256 amount) external onlyAuth returns (bool) { 241 | _mint(to, amount); 242 | return true; 243 | } 244 | 245 | function burn(address from, uint256 amount) external onlyAuth returns (bool) { 246 | require(from != address(0), "AnyswapV3ERC20: address(0x0)"); 247 | _burn(from, amount); 248 | return true; 249 | } 250 | 251 | function Swapin(bytes32 txhash, address account, uint256 amount) public onlyAuth returns (bool) { 252 | _mint(account, amount); 253 | emit LogSwapin(txhash, account, amount); 254 | return true; 255 | } 256 | 257 | function Swapout(uint256 amount, address bindaddr) public returns (bool) { 258 | require(!_vaultOnly, "AnyswapV4ERC20: onlyAuth"); 259 | require(bindaddr != address(0), "AnyswapV3ERC20: address(0x0)"); 260 | _burn(msg.sender, amount); 261 | emit LogSwapout(msg.sender, bindaddr, amount); 262 | return true; 263 | } 264 | 265 | /// @dev Records current ERC2612 nonce for account. This value must be included whenever signature is generated for {permit}. 266 | /// Every successful call to {permit} increases account's nonce by one. This prevents signature from being used multiple times. 267 | mapping (address => uint256) public override nonces; 268 | 269 | /// @dev Records number of AnyswapV3ERC20 token that account (second) will be allowed to spend on behalf of another account (first) through {transferFrom}. 270 | mapping (address => mapping (address => uint256)) public override allowance; 271 | 272 | event LogChangeVault(address indexed oldVault, address indexed newVault, uint indexed effectiveTime); 273 | event LogChangeMPCOwner(address indexed oldOwner, address indexed newOwner, uint indexed effectiveHeight); 274 | event LogSwapin(bytes32 indexed txhash, address indexed account, uint amount); 275 | event LogSwapout(address indexed account, address indexed bindaddr, uint amount); 276 | event LogAddAuth(address indexed auth, uint timestamp); 277 | 278 | constructor(string memory _name, string memory _symbol, uint8 _decimals, address _underlying, address _vault) { 279 | name = _name; 280 | symbol = _symbol; 281 | decimals = _decimals; 282 | underlying = _underlying; 283 | if (_underlying != address(0x0)) { 284 | require(_decimals == IERC20(_underlying).decimals()); 285 | } 286 | 287 | // Use init to allow for CREATE2 accross all chains 288 | _init = true; 289 | 290 | // Disable/Enable swapout for v1 tokens vs mint/burn for v3 tokens 291 | _vaultOnly = false; 292 | 293 | vault = _vault; 294 | pendingVault = _vault; 295 | delayVault = block.timestamp; 296 | 297 | uint256 chainId; 298 | assembly {chainId := chainid()} 299 | DOMAIN_SEPARATOR = keccak256( 300 | abi.encode( 301 | keccak256("EIP712Domain(string name,string version,uint256 chainId,address verifyingContract)"), 302 | keccak256(bytes(name)), 303 | keccak256(bytes("1")), 304 | chainId, 305 | address(this))); 306 | } 307 | 308 | /// @dev Returns the total supply of AnyswapV3ERC20 token as the ETH held in this contract. 309 | function totalSupply() external view override returns (uint256) { 310 | return _totalSupply; 311 | } 312 | 313 | function depositWithPermit(address target, uint256 value, uint256 deadline, uint8 v, bytes32 r, bytes32 s, address to) external returns (uint) { 314 | IERC20(underlying).permit(target, address(this), value, deadline, v, r, s); 315 | IERC20(underlying).safeTransferFrom(target, address(this), value); 316 | return _deposit(value, to); 317 | } 318 | 319 | function depositWithTransferPermit(address target, uint256 value, uint256 deadline, uint8 v, bytes32 r, bytes32 s, address to) external returns (uint) { 320 | IERC20(underlying).transferWithPermit(target, address(this), value, deadline, v, r, s); 321 | return _deposit(value, to); 322 | } 323 | 324 | function deposit() external returns (uint) { 325 | uint _amount = IERC20(underlying).balanceOf(msg.sender); 326 | IERC20(underlying).safeTransferFrom(msg.sender, address(this), _amount); 327 | return _deposit(_amount, msg.sender); 328 | } 329 | 330 | function deposit(uint amount) external returns (uint) { 331 | IERC20(underlying).safeTransferFrom(msg.sender, address(this), amount); 332 | return _deposit(amount, msg.sender); 333 | } 334 | 335 | function deposit(uint amount, address to) external returns (uint) { 336 | IERC20(underlying).safeTransferFrom(msg.sender, address(this), amount); 337 | return _deposit(amount, to); 338 | } 339 | 340 | function depositVault(uint amount, address to) external onlyVault returns (uint) { 341 | return _deposit(amount, to); 342 | } 343 | 344 | function _deposit(uint amount, address to) internal returns (uint) { 345 | require(underlying != address(0x0) && underlying != address(this)); 346 | _mint(to, amount); 347 | return amount; 348 | } 349 | 350 | function withdraw() external returns (uint) { 351 | return _withdraw(msg.sender, balanceOf[msg.sender], msg.sender); 352 | } 353 | 354 | function withdraw(uint amount) external returns (uint) { 355 | return _withdraw(msg.sender, amount, msg.sender); 356 | } 357 | 358 | function withdraw(uint amount, address to) external returns (uint) { 359 | return _withdraw(msg.sender, amount, to); 360 | } 361 | 362 | function withdrawVault(address from, uint amount, address to) external onlyVault returns (uint) { 363 | return _withdraw(from, amount, to); 364 | } 365 | 366 | function _withdraw(address from, uint amount, address to) internal returns (uint) { 367 | _burn(from, amount); 368 | IERC20(underlying).safeTransfer(to, amount); 369 | return amount; 370 | } 371 | 372 | /** @dev Creates `amount` tokens and assigns them to `account`, increasing 373 | * the total supply. 374 | * 375 | * Emits a {Transfer} event with `from` set to the zero address. 376 | * 377 | * Requirements 378 | * 379 | * - `to` cannot be the zero address. 380 | */ 381 | function _mint(address account, uint256 amount) internal { 382 | require(account != address(0), "ERC20: mint to the zero address"); 383 | 384 | _totalSupply += amount; 385 | balanceOf[account] += amount; 386 | emit Transfer(address(0), account, amount); 387 | } 388 | 389 | /** 390 | * @dev Destroys `amount` tokens from `account`, reducing the 391 | * total supply. 392 | * 393 | * Emits a {Transfer} event with `to` set to the zero address. 394 | * 395 | * Requirements 396 | * 397 | * - `account` cannot be the zero address. 398 | * - `account` must have at least `amount` tokens. 399 | */ 400 | function _burn(address account, uint256 amount) internal { 401 | require(account != address(0), "ERC20: burn from the zero address"); 402 | 403 | balanceOf[account] -= amount; 404 | _totalSupply -= amount; 405 | emit Transfer(account, address(0), amount); 406 | } 407 | 408 | /// @dev Sets `value` as allowance of `spender` account over caller account's AnyswapV3ERC20 token. 409 | /// Emits {Approval} event. 410 | /// Returns boolean value indicating whether operation succeeded. 411 | function approve(address spender, uint256 value) external override returns (bool) { 412 | // _approve(msg.sender, spender, value); 413 | allowance[msg.sender][spender] = value; 414 | emit Approval(msg.sender, spender, value); 415 | 416 | return true; 417 | } 418 | 419 | /// @dev Sets `value` as allowance of `spender` account over caller account's AnyswapV3ERC20 token, 420 | /// after which a call is executed to an ERC677-compliant contract with the `data` parameter. 421 | /// Emits {Approval} event. 422 | /// Returns boolean value indicating whether operation succeeded. 423 | /// For more information on approveAndCall format, see https://github.com/ethereum/EIPs/issues/677. 424 | function approveAndCall(address spender, uint256 value, bytes calldata data) external override returns (bool) { 425 | // _approve(msg.sender, spender, value); 426 | allowance[msg.sender][spender] = value; 427 | emit Approval(msg.sender, spender, value); 428 | 429 | return IApprovalReceiver(spender).onTokenApproval(msg.sender, value, data); 430 | } 431 | 432 | /// @dev Sets `value` as allowance of `spender` account over `owner` account's AnyswapV3ERC20 token, given `owner` account's signed approval. 433 | /// Emits {Approval} event. 434 | /// Requirements: 435 | /// - `deadline` must be timestamp in future. 436 | /// - `v`, `r` and `s` must be valid `secp256k1` signature from `owner` account over EIP712-formatted function arguments. 437 | /// - the signature must use `owner` account's current nonce (see {nonces}). 438 | /// - the signer cannot be zero address and must be `owner` account. 439 | /// For more information on signature format, see https://eips.ethereum.org/EIPS/eip-2612#specification[relevant EIP section]. 440 | /// AnyswapV3ERC20 token implementation adapted from https://github.com/albertocuestacanada/ERC20Permit/blob/master/contracts/ERC20Permit.sol. 441 | function permit(address target, address spender, uint256 value, uint256 deadline, uint8 v, bytes32 r, bytes32 s) external override { 442 | require(block.timestamp <= deadline, "AnyswapV3ERC20: Expired permit"); 443 | 444 | bytes32 hashStruct = keccak256( 445 | abi.encode( 446 | PERMIT_TYPEHASH, 447 | target, 448 | spender, 449 | value, 450 | nonces[target]++, 451 | deadline)); 452 | 453 | require(verifyEIP712(target, hashStruct, v, r, s) || verifyPersonalSign(target, hashStruct, v, r, s)); 454 | 455 | // _approve(owner, spender, value); 456 | allowance[target][spender] = value; 457 | emit Approval(target, spender, value); 458 | } 459 | 460 | function transferWithPermit(address target, address to, uint256 value, uint256 deadline, uint8 v, bytes32 r, bytes32 s) external override returns (bool) { 461 | require(block.timestamp <= deadline, "AnyswapV3ERC20: Expired permit"); 462 | 463 | bytes32 hashStruct = keccak256( 464 | abi.encode( 465 | TRANSFER_TYPEHASH, 466 | target, 467 | to, 468 | value, 469 | nonces[target]++, 470 | deadline)); 471 | 472 | require(verifyEIP712(target, hashStruct, v, r, s) || verifyPersonalSign(target, hashStruct, v, r, s)); 473 | 474 | require(to != address(0) || to != address(this)); 475 | 476 | uint256 balance = balanceOf[target]; 477 | require(balance >= value, "AnyswapV3ERC20: transfer amount exceeds balance"); 478 | 479 | balanceOf[target] = balance - value; 480 | balanceOf[to] += value; 481 | emit Transfer(target, to, value); 482 | 483 | return true; 484 | } 485 | 486 | function verifyEIP712(address target, bytes32 hashStruct, uint8 v, bytes32 r, bytes32 s) internal view returns (bool) { 487 | bytes32 hash = keccak256( 488 | abi.encodePacked( 489 | "\x19\x01", 490 | DOMAIN_SEPARATOR, 491 | hashStruct)); 492 | address signer = ecrecover(hash, v, r, s); 493 | return (signer != address(0) && signer == target); 494 | } 495 | 496 | function verifyPersonalSign(address target, bytes32 hashStruct, uint8 v, bytes32 r, bytes32 s) internal pure returns (bool) { 497 | bytes32 hash = prefixed(hashStruct); 498 | address signer = ecrecover(hash, v, r, s); 499 | return (signer != address(0) && signer == target); 500 | } 501 | 502 | // Builds a prefixed hash to mimic the behavior of eth_sign. 503 | function prefixed(bytes32 hash) internal pure returns (bytes32) { 504 | return keccak256(abi.encodePacked("\x19Ethereum Signed Message:\n32", hash)); 505 | } 506 | 507 | /// @dev Moves `value` AnyswapV3ERC20 token from caller's account to account (`to`). 508 | /// A transfer to `address(0)` triggers an ETH withdraw matching the sent AnyswapV3ERC20 token in favor of caller. 509 | /// Emits {Transfer} event. 510 | /// Returns boolean value indicating whether operation succeeded. 511 | /// Requirements: 512 | /// - caller account must have at least `value` AnyswapV3ERC20 token. 513 | function transfer(address to, uint256 value) external override returns (bool) { 514 | require(to != address(0) || to != address(this)); 515 | uint256 balance = balanceOf[msg.sender]; 516 | require(balance >= value, "AnyswapV3ERC20: transfer amount exceeds balance"); 517 | 518 | balanceOf[msg.sender] = balance - value; 519 | balanceOf[to] += value; 520 | emit Transfer(msg.sender, to, value); 521 | 522 | return true; 523 | } 524 | 525 | /// @dev Moves `value` AnyswapV3ERC20 token from account (`from`) to account (`to`) using allowance mechanism. 526 | /// `value` is then deducted from caller account's allowance, unless set to `type(uint256).max`. 527 | /// A transfer to `address(0)` triggers an ETH withdraw matching the sent AnyswapV3ERC20 token in favor of caller. 528 | /// Emits {Approval} event to reflect reduced allowance `value` for caller account to spend from account (`from`), 529 | /// unless allowance is set to `type(uint256).max` 530 | /// Emits {Transfer} event. 531 | /// Returns boolean value indicating whether operation succeeded. 532 | /// Requirements: 533 | /// - `from` account must have at least `value` balance of AnyswapV3ERC20 token. 534 | /// - `from` account must have approved caller to spend at least `value` of AnyswapV3ERC20 token, unless `from` and caller are the same account. 535 | function transferFrom(address from, address to, uint256 value) external override returns (bool) { 536 | require(to != address(0) || to != address(this)); 537 | if (from != msg.sender) { 538 | // _decreaseAllowance(from, msg.sender, value); 539 | uint256 allowed = allowance[from][msg.sender]; 540 | if (allowed != type(uint256).max) { 541 | require(allowed >= value, "AnyswapV3ERC20: request exceeds allowance"); 542 | uint256 reduced = allowed - value; 543 | allowance[from][msg.sender] = reduced; 544 | emit Approval(from, msg.sender, reduced); 545 | } 546 | } 547 | 548 | uint256 balance = balanceOf[from]; 549 | require(balance >= value, "AnyswapV3ERC20: transfer amount exceeds balance"); 550 | 551 | balanceOf[from] = balance - value; 552 | balanceOf[to] += value; 553 | emit Transfer(from, to, value); 554 | 555 | return true; 556 | } 557 | 558 | /// @dev Moves `value` AnyswapV3ERC20 token from caller's account to account (`to`), 559 | /// after which a call is executed to an ERC677-compliant contract with the `data` parameter. 560 | /// A transfer to `address(0)` triggers an ETH withdraw matching the sent AnyswapV3ERC20 token in favor of caller. 561 | /// Emits {Transfer} event. 562 | /// Returns boolean value indicating whether operation succeeded. 563 | /// Requirements: 564 | /// - caller account must have at least `value` AnyswapV3ERC20 token. 565 | /// For more information on transferAndCall format, see https://github.com/ethereum/EIPs/issues/677. 566 | function transferAndCall(address to, uint value, bytes calldata data) external override returns (bool) { 567 | require(to != address(0) || to != address(this)); 568 | 569 | uint256 balance = balanceOf[msg.sender]; 570 | require(balance >= value, "AnyswapV3ERC20: transfer amount exceeds balance"); 571 | 572 | balanceOf[msg.sender] = balance - value; 573 | balanceOf[to] += value; 574 | emit Transfer(msg.sender, to, value); 575 | 576 | return ITransferReceiver(to).onTokenTransfer(msg.sender, value, data); 577 | } 578 | } 579 | -------------------------------------------------------------------------------- /AnyswapV5ERC20.sol: -------------------------------------------------------------------------------- 1 | // SPDX-License-Identifier: GPL-3.0-or-later 2 | 3 | pragma solidity 0.8.2; 4 | 5 | /** 6 | * @dev Interface of the ERC20 standard as defined in the EIP. 7 | */ 8 | interface IERC20 { 9 | function totalSupply() external view returns (uint256); 10 | function decimals() external view returns (uint8); 11 | function balanceOf(address account) external view returns (uint256); 12 | function transfer(address recipient, uint256 amount) external returns (bool); 13 | function allowance(address owner, address spender) external view returns (uint256); 14 | function approve(address spender, uint256 amount) external returns (bool); 15 | function transferFrom(address sender, address recipient, uint256 amount) external returns (bool); 16 | function permit(address target, address spender, uint256 value, uint256 deadline, uint8 v, bytes32 r, bytes32 s) external; 17 | function transferWithPermit(address target, address to, uint256 value, uint256 deadline, uint8 v, bytes32 r, bytes32 s) external returns (bool); 18 | event Transfer(address indexed from, address indexed to, uint256 value); 19 | event Approval(address indexed owner, address indexed spender, uint256 value); 20 | } 21 | 22 | /** 23 | * @dev Interface of the ERC2612 standard as defined in the EIP. 24 | * 25 | * Adds the {permit} method, which can be used to change one's 26 | * {IERC20-allowance} without having to send a transaction, by signing a 27 | * message. This allows users to spend tokens without having to hold Ether. 28 | * 29 | * See https://eips.ethereum.org/EIPS/eip-2612. 30 | */ 31 | interface IERC2612 { 32 | 33 | /** 34 | * @dev Returns the current ERC2612 nonce for `owner`. This value must be 35 | * included whenever a signature is generated for {permit}. 36 | * 37 | * Every successful call to {permit} increases ``owner``'s nonce by one. This 38 | * prevents a signature from being used multiple times. 39 | */ 40 | function nonces(address owner) external view returns (uint256); 41 | } 42 | 43 | /// @dev Wrapped ERC-20 v10 (AnyswapV3ERC20) is an ERC-20 ERC-20 wrapper. You can `deposit` ERC-20 and obtain an AnyswapV3ERC20 balance which can then be operated as an ERC-20 token. You can 44 | /// `withdraw` ERC-20 from AnyswapV3ERC20, which will then burn AnyswapV3ERC20 token in your wallet. The amount of AnyswapV3ERC20 token in any wallet is always identical to the 45 | /// balance of ERC-20 deposited minus the ERC-20 withdrawn with that specific wallet. 46 | interface IAnyswapV3ERC20 is IERC20, IERC2612 { 47 | 48 | /// @dev Sets `value` as allowance of `spender` account over caller account's AnyswapV3ERC20 token, 49 | /// after which a call is executed to an ERC677-compliant contract with the `data` parameter. 50 | /// Emits {Approval} event. 51 | /// Returns boolean value indicating whether operation succeeded. 52 | /// For more information on approveAndCall format, see https://github.com/ethereum/EIPs/issues/677. 53 | function approveAndCall(address spender, uint256 value, bytes calldata data) external returns (bool); 54 | 55 | /// @dev Moves `value` AnyswapV3ERC20 token from caller's account to account (`to`), 56 | /// after which a call is executed to an ERC677-compliant contract with the `data` parameter. 57 | /// A transfer to `address(0)` triggers an ERC-20 withdraw matching the sent AnyswapV3ERC20 token in favor of caller. 58 | /// Emits {Transfer} event. 59 | /// Returns boolean value indicating whether operation succeeded. 60 | /// Requirements: 61 | /// - caller account must have at least `value` AnyswapV3ERC20 token. 62 | /// For more information on transferAndCall format, see https://github.com/ethereum/EIPs/issues/677. 63 | function transferAndCall(address to, uint value, bytes calldata data) external returns (bool); 64 | } 65 | 66 | interface ITransferReceiver { 67 | function onTokenTransfer(address, uint, bytes calldata) external returns (bool); 68 | } 69 | 70 | interface IApprovalReceiver { 71 | function onTokenApproval(address, uint, bytes calldata) external returns (bool); 72 | } 73 | 74 | library Address { 75 | function isContract(address account) internal view returns (bool) { 76 | bytes32 codehash; 77 | bytes32 accountHash = 0xc5d2460186f7233c927e7db2dcc703c0e500b653ca82273b7bfad8045d85a470; 78 | // solhint-disable-next-line no-inline-assembly 79 | assembly { codehash := extcodehash(account) } 80 | return (codehash != 0x0 && codehash != accountHash); 81 | } 82 | } 83 | 84 | library SafeERC20 { 85 | using Address for address; 86 | 87 | function safeTransfer(IERC20 token, address to, uint value) internal { 88 | callOptionalReturn(token, abi.encodeWithSelector(token.transfer.selector, to, value)); 89 | } 90 | 91 | function safeTransferFrom(IERC20 token, address from, address to, uint value) internal { 92 | callOptionalReturn(token, abi.encodeWithSelector(token.transferFrom.selector, from, to, value)); 93 | } 94 | 95 | function safeApprove(IERC20 token, address spender, uint value) internal { 96 | require((value == 0) || (token.allowance(address(this), spender) == 0), 97 | "SafeERC20: approve from non-zero to non-zero allowance" 98 | ); 99 | callOptionalReturn(token, abi.encodeWithSelector(token.approve.selector, spender, value)); 100 | } 101 | function callOptionalReturn(IERC20 token, bytes memory data) private { 102 | require(address(token).isContract(), "SafeERC20: call to non-contract"); 103 | 104 | // solhint-disable-next-line avoid-low-level-calls 105 | (bool success, bytes memory returndata) = address(token).call(data); 106 | require(success, "SafeERC20: low-level call failed"); 107 | 108 | if (returndata.length > 0) { // Return data is optional 109 | // solhint-disable-next-line max-line-length 110 | require(abi.decode(returndata, (bool)), "SafeERC20: ERC20 operation did not succeed"); 111 | } 112 | } 113 | } 114 | 115 | contract AnyswapV5ERC20 is IAnyswapV3ERC20 { 116 | using SafeERC20 for IERC20; 117 | string public name; 118 | string public symbol; 119 | uint8 public immutable override decimals; 120 | 121 | address public immutable underlying; 122 | 123 | bytes32 public constant PERMIT_TYPEHASH = keccak256("Permit(address owner,address spender,uint256 value,uint256 nonce,uint256 deadline)"); 124 | bytes32 public constant TRANSFER_TYPEHASH = keccak256("Transfer(address owner,address to,uint256 value,uint256 nonce,uint256 deadline)"); 125 | bytes32 public immutable DOMAIN_SEPARATOR; 126 | 127 | /// @dev Records amount of AnyswapV3ERC20 token owned by account. 128 | mapping (address => uint256) public override balanceOf; 129 | uint256 private _totalSupply; 130 | 131 | // init flag for setting immediate vault, needed for CREATE2 support 132 | bool private _init; 133 | 134 | // flag to enable/disable swapout vs vault.burn so multiple events are triggered 135 | bool private _vaultOnly; 136 | 137 | // configurable delay for timelock functions 138 | uint public delay = 2*24*3600; 139 | 140 | 141 | // set of minters, can be this bridge or other bridges 142 | mapping(address => bool) public isMinter; 143 | address[] public minters; 144 | 145 | // primary controller of the token contract 146 | address public vault; 147 | 148 | address public pendingMinter; 149 | uint public delayMinter; 150 | 151 | address public pendingVault; 152 | uint public delayVault; 153 | 154 | uint public pendingDelay; 155 | uint public delayDelay; 156 | 157 | 158 | modifier onlyAuth() { 159 | require(isMinter[msg.sender], "AnyswapV4ERC20: FORBIDDEN"); 160 | _; 161 | } 162 | 163 | modifier onlyVault() { 164 | require(msg.sender == mpc(), "AnyswapV3ERC20: FORBIDDEN"); 165 | _; 166 | } 167 | 168 | function owner() public view returns (address) { 169 | return mpc(); 170 | } 171 | 172 | function mpc() public view returns (address) { 173 | if (block.timestamp >= delayVault) { 174 | return pendingVault; 175 | } 176 | return vault; 177 | } 178 | 179 | function setVaultOnly(bool enabled) external onlyVault { 180 | _vaultOnly = enabled; 181 | } 182 | 183 | function initVault(address _vault) external onlyVault { 184 | require(_init); 185 | vault = _vault; 186 | pendingVault = _vault; 187 | isMinter[_vault] = true; 188 | minters.push(_vault); 189 | delayVault = block.timestamp; 190 | _init = false; 191 | } 192 | 193 | function setMinter(address _auth) external onlyVault { 194 | pendingMinter = _auth; 195 | delayMinter = block.timestamp + delay; 196 | } 197 | 198 | function setVault(address _vault) external onlyVault { 199 | pendingVault = _vault; 200 | delayVault = block.timestamp + delay; 201 | } 202 | 203 | function applyVault() external onlyVault { 204 | require(block.timestamp >= delayVault); 205 | vault = pendingVault; 206 | } 207 | 208 | function applyMinter() external onlyVault { 209 | require(block.timestamp >= delayMinter); 210 | isMinter[pendingMinter] = true; 211 | minters.push(pendingMinter); 212 | } 213 | 214 | // No time delay revoke minter emergency function 215 | function revokeMinter(address _auth) external onlyVault { 216 | isMinter[_auth] = false; 217 | } 218 | 219 | function getAllMinters() external view returns (address[] memory) { 220 | return minters; 221 | } 222 | 223 | 224 | function changeVault(address newVault) external onlyVault returns (bool) { 225 | require(newVault != address(0), "AnyswapV3ERC20: address(0x0)"); 226 | pendingVault = newVault; 227 | delayVault = block.timestamp + delay; 228 | emit LogChangeVault(vault, pendingVault, delayVault); 229 | return true; 230 | } 231 | 232 | function changeMPCOwner(address newVault) public onlyVault returns (bool) { 233 | require(newVault != address(0), "AnyswapV3ERC20: address(0x0)"); 234 | pendingVault = newVault; 235 | delayVault = block.timestamp + delay; 236 | emit LogChangeMPCOwner(vault, pendingVault, delayVault); 237 | return true; 238 | } 239 | 240 | function mint(address to, uint256 amount) external onlyAuth returns (bool) { 241 | _mint(to, amount); 242 | return true; 243 | } 244 | 245 | function burn(address from, uint256 amount) external onlyAuth returns (bool) { 246 | require(from != address(0), "AnyswapV3ERC20: address(0x0)"); 247 | _burn(from, amount); 248 | return true; 249 | } 250 | 251 | function Swapin(bytes32 txhash, address account, uint256 amount) public onlyAuth returns (bool) { 252 | _mint(account, amount); 253 | emit LogSwapin(txhash, account, amount); 254 | return true; 255 | } 256 | 257 | function Swapout(uint256 amount, address bindaddr) public returns (bool) { 258 | require(!_vaultOnly, "AnyswapV4ERC20: onlyAuth"); 259 | require(bindaddr != address(0), "AnyswapV3ERC20: address(0x0)"); 260 | _burn(msg.sender, amount); 261 | emit LogSwapout(msg.sender, bindaddr, amount); 262 | return true; 263 | } 264 | 265 | /// @dev Records current ERC2612 nonce for account. This value must be included whenever signature is generated for {permit}. 266 | /// Every successful call to {permit} increases account's nonce by one. This prevents signature from being used multiple times. 267 | mapping (address => uint256) public override nonces; 268 | 269 | /// @dev Records number of AnyswapV3ERC20 token that account (second) will be allowed to spend on behalf of another account (first) through {transferFrom}. 270 | mapping (address => mapping (address => uint256)) public override allowance; 271 | 272 | event LogChangeVault(address indexed oldVault, address indexed newVault, uint indexed effectiveTime); 273 | event LogChangeMPCOwner(address indexed oldOwner, address indexed newOwner, uint indexed effectiveHeight); 274 | event LogSwapin(bytes32 indexed txhash, address indexed account, uint amount); 275 | event LogSwapout(address indexed account, address indexed bindaddr, uint amount); 276 | event LogAddAuth(address indexed auth, uint timestamp); 277 | 278 | constructor(string memory _name, string memory _symbol, uint8 _decimals, address _underlying, address _vault) { 279 | name = _name; 280 | symbol = _symbol; 281 | decimals = _decimals; 282 | underlying = _underlying; 283 | if (_underlying != address(0x0)) { 284 | require(_decimals == IERC20(_underlying).decimals()); 285 | } 286 | 287 | // Use init to allow for CREATE2 accross all chains 288 | _init = true; 289 | 290 | // Disable/Enable swapout for v1 tokens vs mint/burn for v3 tokens 291 | _vaultOnly = false; 292 | 293 | vault = _vault; 294 | pendingVault = _vault; 295 | delayVault = block.timestamp; 296 | 297 | uint256 chainId; 298 | assembly {chainId := chainid()} 299 | DOMAIN_SEPARATOR = keccak256( 300 | abi.encode( 301 | keccak256("EIP712Domain(string name,string version,uint256 chainId,address verifyingContract)"), 302 | keccak256(bytes(name)), 303 | keccak256(bytes("1")), 304 | chainId, 305 | address(this))); 306 | } 307 | 308 | /// @dev Returns the total supply of AnyswapV3ERC20 token as the ETH held in this contract. 309 | function totalSupply() external view override returns (uint256) { 310 | return _totalSupply; 311 | } 312 | 313 | function depositWithPermit(address target, uint256 value, uint256 deadline, uint8 v, bytes32 r, bytes32 s, address to) external returns (uint) { 314 | IERC20(underlying).permit(target, address(this), value, deadline, v, r, s); 315 | IERC20(underlying).safeTransferFrom(target, address(this), value); 316 | return _deposit(value, to); 317 | } 318 | 319 | function depositWithTransferPermit(address target, uint256 value, uint256 deadline, uint8 v, bytes32 r, bytes32 s, address to) external returns (uint) { 320 | IERC20(underlying).transferWithPermit(target, address(this), value, deadline, v, r, s); 321 | return _deposit(value, to); 322 | } 323 | 324 | function deposit() external returns (uint) { 325 | uint _amount = IERC20(underlying).balanceOf(msg.sender); 326 | IERC20(underlying).safeTransferFrom(msg.sender, address(this), _amount); 327 | return _deposit(_amount, msg.sender); 328 | } 329 | 330 | function deposit(uint amount) external returns (uint) { 331 | IERC20(underlying).safeTransferFrom(msg.sender, address(this), amount); 332 | return _deposit(amount, msg.sender); 333 | } 334 | 335 | function deposit(uint amount, address to) external returns (uint) { 336 | IERC20(underlying).safeTransferFrom(msg.sender, address(this), amount); 337 | return _deposit(amount, to); 338 | } 339 | 340 | function depositVault(uint amount, address to) external onlyVault returns (uint) { 341 | return _deposit(amount, to); 342 | } 343 | 344 | function _deposit(uint amount, address to) internal returns (uint) { 345 | require(underlying != address(0x0) && underlying != address(this)); 346 | _mint(to, amount); 347 | return amount; 348 | } 349 | 350 | function withdraw() external returns (uint) { 351 | return _withdraw(msg.sender, balanceOf[msg.sender], msg.sender); 352 | } 353 | 354 | function withdraw(uint amount) external returns (uint) { 355 | return _withdraw(msg.sender, amount, msg.sender); 356 | } 357 | 358 | function withdraw(uint amount, address to) external returns (uint) { 359 | return _withdraw(msg.sender, amount, to); 360 | } 361 | 362 | function withdrawVault(address from, uint amount, address to) external onlyVault returns (uint) { 363 | return _withdraw(from, amount, to); 364 | } 365 | 366 | function _withdraw(address from, uint amount, address to) internal returns (uint) { 367 | _burn(from, amount); 368 | IERC20(underlying).safeTransfer(to, amount); 369 | return amount; 370 | } 371 | 372 | /** @dev Creates `amount` tokens and assigns them to `account`, increasing 373 | * the total supply. 374 | * 375 | * Emits a {Transfer} event with `from` set to the zero address. 376 | * 377 | * Requirements 378 | * 379 | * - `to` cannot be the zero address. 380 | */ 381 | function _mint(address account, uint256 amount) internal { 382 | require(account != address(0), "ERC20: mint to the zero address"); 383 | 384 | _totalSupply += amount; 385 | balanceOf[account] += amount; 386 | emit Transfer(address(0), account, amount); 387 | } 388 | 389 | /** 390 | * @dev Destroys `amount` tokens from `account`, reducing the 391 | * total supply. 392 | * 393 | * Emits a {Transfer} event with `to` set to the zero address. 394 | * 395 | * Requirements 396 | * 397 | * - `account` cannot be the zero address. 398 | * - `account` must have at least `amount` tokens. 399 | */ 400 | function _burn(address account, uint256 amount) internal { 401 | require(account != address(0), "ERC20: burn from the zero address"); 402 | 403 | balanceOf[account] -= amount; 404 | _totalSupply -= amount; 405 | emit Transfer(account, address(0), amount); 406 | } 407 | 408 | /// @dev Sets `value` as allowance of `spender` account over caller account's AnyswapV3ERC20 token. 409 | /// Emits {Approval} event. 410 | /// Returns boolean value indicating whether operation succeeded. 411 | function approve(address spender, uint256 value) external override returns (bool) { 412 | // _approve(msg.sender, spender, value); 413 | allowance[msg.sender][spender] = value; 414 | emit Approval(msg.sender, spender, value); 415 | 416 | return true; 417 | } 418 | 419 | /// @dev Sets `value` as allowance of `spender` account over caller account's AnyswapV3ERC20 token, 420 | /// after which a call is executed to an ERC677-compliant contract with the `data` parameter. 421 | /// Emits {Approval} event. 422 | /// Returns boolean value indicating whether operation succeeded. 423 | /// For more information on approveAndCall format, see https://github.com/ethereum/EIPs/issues/677. 424 | function approveAndCall(address spender, uint256 value, bytes calldata data) external override returns (bool) { 425 | // _approve(msg.sender, spender, value); 426 | allowance[msg.sender][spender] = value; 427 | emit Approval(msg.sender, spender, value); 428 | 429 | return IApprovalReceiver(spender).onTokenApproval(msg.sender, value, data); 430 | } 431 | 432 | /// @dev Sets `value` as allowance of `spender` account over `owner` account's AnyswapV3ERC20 token, given `owner` account's signed approval. 433 | /// Emits {Approval} event. 434 | /// Requirements: 435 | /// - `deadline` must be timestamp in future. 436 | /// - `v`, `r` and `s` must be valid `secp256k1` signature from `owner` account over EIP712-formatted function arguments. 437 | /// - the signature must use `owner` account's current nonce (see {nonces}). 438 | /// - the signer cannot be zero address and must be `owner` account. 439 | /// For more information on signature format, see https://eips.ethereum.org/EIPS/eip-2612#specification[relevant EIP section]. 440 | /// AnyswapV3ERC20 token implementation adapted from https://github.com/albertocuestacanada/ERC20Permit/blob/master/contracts/ERC20Permit.sol. 441 | function permit(address target, address spender, uint256 value, uint256 deadline, uint8 v, bytes32 r, bytes32 s) external override { 442 | require(block.timestamp <= deadline, "AnyswapV3ERC20: Expired permit"); 443 | 444 | bytes32 hashStruct = keccak256( 445 | abi.encode( 446 | PERMIT_TYPEHASH, 447 | target, 448 | spender, 449 | value, 450 | nonces[target]++, 451 | deadline)); 452 | 453 | require(verifyEIP712(target, hashStruct, v, r, s) || verifyPersonalSign(target, hashStruct, v, r, s)); 454 | 455 | // _approve(owner, spender, value); 456 | allowance[target][spender] = value; 457 | emit Approval(target, spender, value); 458 | } 459 | 460 | function transferWithPermit(address target, address to, uint256 value, uint256 deadline, uint8 v, bytes32 r, bytes32 s) external override returns (bool) { 461 | require(block.timestamp <= deadline, "AnyswapV3ERC20: Expired permit"); 462 | 463 | bytes32 hashStruct = keccak256( 464 | abi.encode( 465 | TRANSFER_TYPEHASH, 466 | target, 467 | to, 468 | value, 469 | nonces[target]++, 470 | deadline)); 471 | 472 | require(verifyEIP712(target, hashStruct, v, r, s) || verifyPersonalSign(target, hashStruct, v, r, s)); 473 | 474 | require(to != address(0) || to != address(this)); 475 | 476 | uint256 balance = balanceOf[target]; 477 | require(balance >= value, "AnyswapV3ERC20: transfer amount exceeds balance"); 478 | 479 | balanceOf[target] = balance - value; 480 | balanceOf[to] += value; 481 | emit Transfer(target, to, value); 482 | 483 | return true; 484 | } 485 | 486 | function verifyEIP712(address target, bytes32 hashStruct, uint8 v, bytes32 r, bytes32 s) internal view returns (bool) { 487 | bytes32 hash = keccak256( 488 | abi.encodePacked( 489 | "\x19\x01", 490 | DOMAIN_SEPARATOR, 491 | hashStruct)); 492 | address signer = ecrecover(hash, v, r, s); 493 | return (signer != address(0) && signer == target); 494 | } 495 | 496 | function verifyPersonalSign(address target, bytes32 hashStruct, uint8 v, bytes32 r, bytes32 s) internal view returns (bool) { 497 | bytes32 hash = prefixed(hashStruct); 498 | address signer = ecrecover(hash, v, r, s); 499 | return (signer != address(0) && signer == target); 500 | } 501 | 502 | // Builds a prefixed hash to mimic the behavior of eth_sign. 503 | function prefixed(bytes32 hash) internal view returns (bytes32) { 504 | return keccak256(abi.encodePacked("\x19Ethereum Signed Message:\n32", DOMAIN_SEPARATOR, hash)); 505 | } 506 | 507 | /// @dev Moves `value` AnyswapV3ERC20 token from caller's account to account (`to`). 508 | /// A transfer to `address(0)` triggers an ETH withdraw matching the sent AnyswapV3ERC20 token in favor of caller. 509 | /// Emits {Transfer} event. 510 | /// Returns boolean value indicating whether operation succeeded. 511 | /// Requirements: 512 | /// - caller account must have at least `value` AnyswapV3ERC20 token. 513 | function transfer(address to, uint256 value) external override returns (bool) { 514 | require(to != address(0) || to != address(this)); 515 | uint256 balance = balanceOf[msg.sender]; 516 | require(balance >= value, "AnyswapV3ERC20: transfer amount exceeds balance"); 517 | 518 | balanceOf[msg.sender] = balance - value; 519 | balanceOf[to] += value; 520 | emit Transfer(msg.sender, to, value); 521 | 522 | return true; 523 | } 524 | 525 | /// @dev Moves `value` AnyswapV3ERC20 token from account (`from`) to account (`to`) using allowance mechanism. 526 | /// `value` is then deducted from caller account's allowance, unless set to `type(uint256).max`. 527 | /// A transfer to `address(0)` triggers an ETH withdraw matching the sent AnyswapV3ERC20 token in favor of caller. 528 | /// Emits {Approval} event to reflect reduced allowance `value` for caller account to spend from account (`from`), 529 | /// unless allowance is set to `type(uint256).max` 530 | /// Emits {Transfer} event. 531 | /// Returns boolean value indicating whether operation succeeded. 532 | /// Requirements: 533 | /// - `from` account must have at least `value` balance of AnyswapV3ERC20 token. 534 | /// - `from` account must have approved caller to spend at least `value` of AnyswapV3ERC20 token, unless `from` and caller are the same account. 535 | function transferFrom(address from, address to, uint256 value) external override returns (bool) { 536 | require(to != address(0) || to != address(this)); 537 | if (from != msg.sender) { 538 | // _decreaseAllowance(from, msg.sender, value); 539 | uint256 allowed = allowance[from][msg.sender]; 540 | if (allowed != type(uint256).max) { 541 | require(allowed >= value, "AnyswapV3ERC20: request exceeds allowance"); 542 | uint256 reduced = allowed - value; 543 | allowance[from][msg.sender] = reduced; 544 | emit Approval(from, msg.sender, reduced); 545 | } 546 | } 547 | 548 | uint256 balance = balanceOf[from]; 549 | require(balance >= value, "AnyswapV3ERC20: transfer amount exceeds balance"); 550 | 551 | balanceOf[from] = balance - value; 552 | balanceOf[to] += value; 553 | emit Transfer(from, to, value); 554 | 555 | return true; 556 | } 557 | 558 | /// @dev Moves `value` AnyswapV3ERC20 token from caller's account to account (`to`), 559 | /// after which a call is executed to an ERC677-compliant contract with the `data` parameter. 560 | /// A transfer to `address(0)` triggers an ETH withdraw matching the sent AnyswapV3ERC20 token in favor of caller. 561 | /// Emits {Transfer} event. 562 | /// Returns boolean value indicating whether operation succeeded. 563 | /// Requirements: 564 | /// - caller account must have at least `value` AnyswapV3ERC20 token. 565 | /// For more information on transferAndCall format, see https://github.com/ethereum/EIPs/issues/677. 566 | function transferAndCall(address to, uint value, bytes calldata data) external override returns (bool) { 567 | require(to != address(0) || to != address(this)); 568 | 569 | uint256 balance = balanceOf[msg.sender]; 570 | require(balance >= value, "AnyswapV3ERC20: transfer amount exceeds balance"); 571 | 572 | balanceOf[msg.sender] = balance - value; 573 | balanceOf[to] += value; 574 | emit Transfer(msg.sender, to, value); 575 | 576 | return ITransferReceiver(to).onTokenTransfer(msg.sender, value, data); 577 | } 578 | } 579 | -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | MIT License 2 | 3 | Copyright (c) 2021 Connext 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy 6 | of this software and associated documentation files (the "Software"), to deal 7 | in the Software without restriction, including without limitation the rights 8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | copies of the Software, and to permit persons to whom the Software is 10 | furnished to do so, subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in all 13 | copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 21 | SOFTWARE. 22 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # Cross-chain EVM-based Tokens 2 | 3 | * [multichain.xyz](https://multichain.xyz) 4 | * [anyswap.exchange](http://anyswap.exchange/bridge) 5 | * [Polygon Bridge](https://wallet.matic.network/bridge/) 6 | * [xDAI bridge](https://dai-bridge.poa.network/) 7 | 8 | Live data source available on [chainid.json](https://bridgeapi.anyswap.exchange/v2/serverInfo/chainid) 9 | 10 | Deploy your own token and create a PR by following the [guide](./deploy.md) 11 | 12 | ## Example 13 | 14 | ```json 15 | "yfi": { 16 | "srcChainID": "1", 17 | "destChainID": "56", 18 | "PairID": "YFI", 19 | "SrcToken": { 20 | "ID": "YFI", 21 | "Name": "yearn.finance", 22 | "Symbol": "YFI", 23 | "Decimals": 18, 24 | "Description": "yearn.finance", 25 | "DepositAddress": "0x13B432914A996b0A48695dF9B2d701edA45FF264", 26 | "mpcAddress": "0x13B432914A996b0A48695dF9B2d701edA45FF264", 27 | "ContractAddress": "0x0bc529c00C6401aEF6D220BE8C6Ea1667F6Ad93e", 28 | "MaximumSwap": 20, 29 | "MinimumSwap": 0.0005, 30 | "BigValueThreshold": 5, 31 | "SwapFeeRate": 0, 32 | "MaximumSwapFee": 0, 33 | "MinimumSwapFee": 0, 34 | "PlusGasPricePercentage": 10, 35 | "DisableSwap": false, 36 | "IsDelegateContract": false 37 | }, 38 | "DestToken": { 39 | "ID": "anyYFI", 40 | "Name": "YFI-ERC20", 41 | "Symbol": "anyYFI", 42 | "Decimals": 18, 43 | "Description": "cross chain bridge YFI with anyYFI", 44 | "mpcAddress": "0x13B432914A996b0A48695dF9B2d701edA45FF264", 45 | "ContractAddress": "0x9883ae441105f815b472517389b979f031b5c87e", 46 | "MaximumSwap": 20, 47 | "MinimumSwap": 0.002, 48 | "BigValueThreshold": 2, 49 | "SwapFeeRate": 0.001, 50 | "MaximumSwapFee": 0.01, 51 | "MinimumSwapFee": 0.001, 52 | "PlusGasPricePercentage": 1, 53 | "DisableSwap": false, 54 | "IsDelegateContract": false 55 | } 56 | } 57 | ``` 58 | 59 | # EVM-based Chains 60 | 61 | * [chainlist.org](https://chainlist.org) 62 | * [chainid.network](https://chainid.network) 63 | 64 | Listed by chainId according to EIP-155 65 | 66 | Data source available on [~/ethereum-lists/chains/_data/chains.json](https://github.com/ethereum-lists/chains/tree/master/_data/chains) 67 | 68 | ## Example 69 | 70 | ```json 71 | { 72 | "name": "Ethereum Mainnet", 73 | "chain": "ETH", 74 | "network": "mainnet", 75 | "rpc": [ 76 | "https://mainnet.infura.io/v3/${INFURA_API_KEY}", 77 | "https://api.mycryptoapi.com/eth" 78 | ], 79 | "faucets": [], 80 | "nativeCurrency": { 81 | "name": "Ether", 82 | "symbol": "ETH", 83 | "decimals": 18 84 | }, 85 | "infoURL": "https://ethereum.org", 86 | "shortName": "eth", 87 | "chainId": 1, 88 | "networkId": 1 89 | } 90 | ``` 91 | -------------------------------------------------------------------------------- /amarokGlobal.json: -------------------------------------------------------------------------------- 1 | [ 2 | { 3 | "environment": "production", 4 | "backendUrl": "https://postgrest.testnet.staging.connext.ninja" 5 | }, 6 | { 7 | "environment": "staging", 8 | "backendUrl": "https://postgrest.testnet.staging.connext.ninja" 9 | } 10 | ] 11 | -------------------------------------------------------------------------------- /config/cloudfront.tf: -------------------------------------------------------------------------------- 1 | resource "aws_cloudfront_distribution" "s3_distribution" { 2 | depends_on = [ 3 | aws_s3_bucket.s3_bucket 4 | ] 5 | 6 | origin { 7 | domain_name = "${var.domain_name}.s3.amazonaws.com" 8 | origin_id = "s3-cloudfront" 9 | 10 | s3_origin_config { 11 | origin_access_identity = aws_cloudfront_origin_access_identity.origin_access_identity.cloudfront_access_identity_path 12 | } 13 | } 14 | 15 | enabled = true 16 | is_ipv6_enabled = true 17 | default_root_object = "chaindata.json" 18 | 19 | aliases = ["chaindata.connext.ninja"] 20 | 21 | default_cache_behavior { 22 | // CORS-S3Origin 23 | origin_request_policy_id = "88a5eaf4-2fd4-4709-b370-b4c650ea3fcf" 24 | // SimpleCORS 25 | response_headers_policy_id = "60669652-455b-4ae9-85a4-c4c02393f86c" 26 | // AccessControlCachePolicy 27 | cache_policy_id = "cb51e564-9b52-4fca-8cf4-a7d4ecfdaf94" 28 | allowed_methods = [ 29 | "GET", 30 | "HEAD", 31 | ] 32 | 33 | cached_methods = [ 34 | "GET", 35 | "HEAD", 36 | ] 37 | 38 | target_origin_id = "s3-cloudfront" 39 | 40 | 41 | viewer_protocol_policy = "redirect-to-https" 42 | 43 | # https://stackoverflow.com/questions/67845341/cloudfront-s3-etag-possible-for-cloudfront-to-send-updated-s3-object-before-t 44 | min_ttl = var.cloudfront_min_ttl 45 | default_ttl = var.cloudfront_default_ttl 46 | max_ttl = var.cloudfront_max_ttl 47 | } 48 | 49 | price_class = var.price_class 50 | 51 | restrictions { 52 | geo_restriction { 53 | restriction_type = "none" 54 | } 55 | } 56 | 57 | 58 | viewer_certificate { 59 | cloudfront_default_certificate = false 60 | ssl_support_method = "sni-only" 61 | acm_certificate_arn = var.us_east_1_certificate_arn 62 | } 63 | 64 | custom_error_response { 65 | error_code = 403 66 | response_code = 200 67 | error_caching_min_ttl = 0 68 | response_page_path = "/chaindata.json" 69 | } 70 | 71 | wait_for_deployment = false 72 | tags = var.tags 73 | } 74 | 75 | resource "aws_cloudfront_origin_access_identity" "origin_access_identity" { 76 | comment = "access-identity-${var.domain_name}.s3.amazonaws.com" 77 | } 78 | -------------------------------------------------------------------------------- /config/outputs.tf: -------------------------------------------------------------------------------- 1 | output "cloudfront_domain_name" { 2 | value = aws_cloudfront_distribution.s3_distribution.domain_name 3 | } 4 | 5 | output "cloudfront_dist_id" { 6 | value = aws_cloudfront_distribution.s3_distribution.id 7 | } 8 | 9 | output "s3_domain_name" { 10 | value = aws_s3_bucket.s3_bucket.website_domain 11 | } 12 | 13 | output "website_address" { 14 | value = var.domain_name 15 | } 16 | 17 | output "s3_bucket_arn" { 18 | value = aws_s3_bucket.s3_bucket.arn 19 | } 20 | 21 | output "s3_bucket_name" { 22 | value = aws_s3_bucket.s3_bucket.id 23 | } -------------------------------------------------------------------------------- /config/route53.tf: -------------------------------------------------------------------------------- 1 | 2 | data "aws_route53_zone" "primary" { 3 | zone_id = "Z03634792TWUEHHQ5L0YX" 4 | } 5 | 6 | resource "aws_route53_record" "root_domain" { 7 | zone_id = data.aws_route53_zone.primary.zone_id 8 | name = "chaindata.connext.ninja" 9 | type = "A" 10 | 11 | alias { 12 | name = aws_cloudfront_distribution.s3_distribution.domain_name 13 | zone_id = aws_cloudfront_distribution.s3_distribution.hosted_zone_id 14 | evaluate_target_health = false 15 | } 16 | } 17 | -------------------------------------------------------------------------------- /config/s3.tf: -------------------------------------------------------------------------------- 1 | data "aws_iam_policy_document" "s3_bucket_policy" { 2 | statement { 3 | sid = "1" 4 | 5 | actions = [ 6 | "s3:GetObject", 7 | ] 8 | 9 | resources = [ 10 | "arn:aws:s3:::${var.domain_name}/*", 11 | ] 12 | 13 | principals { 14 | type = "AWS" 15 | 16 | identifiers = [ 17 | aws_cloudfront_origin_access_identity.origin_access_identity.iam_arn, 18 | ] 19 | } 20 | } 21 | } 22 | 23 | 24 | resource "aws_s3_bucket" "s3_bucket" { 25 | bucket = var.domain_name 26 | tags = var.tags 27 | } 28 | 29 | resource "aws_s3_bucket_policy" "s3_bucket_policy" { 30 | bucket = aws_s3_bucket.s3_bucket.id 31 | policy = data.aws_iam_policy_document.s3_bucket_policy.json 32 | } 33 | 34 | resource "aws_s3_bucket_acl" "s3_bucket" { 35 | bucket = var.domain_name 36 | acl = "private" 37 | } 38 | 39 | resource "aws_s3_bucket_versioning" "s3_bucket" { 40 | bucket = var.domain_name 41 | versioning_configuration { 42 | status = "Enabled" 43 | } 44 | } 45 | 46 | resource "aws_s3_object" "network" { 47 | bucket = aws_s3_bucket.s3_bucket.bucket 48 | key = "chaindata.json" 49 | source = "${path.module}/../crossChain.json" 50 | # etag makes the file update when it changes; see https://stackoverflow.com/questions/56107258/terraform-upload-file-to-s3-on-every-apply 51 | etag = filemd5("${path.module}/../crossChain.json") 52 | } 53 | -------------------------------------------------------------------------------- /config/variables.tf: -------------------------------------------------------------------------------- 1 | variable "domain_name" { 2 | description = "domain name (or application name if no domain name available)" 3 | } 4 | 5 | variable "price_class" { 6 | default = "PriceClass_100" // Only US,Canada,Europe 7 | description = "CloudFront distribution price class" 8 | } 9 | 10 | # All values for the TTL are important when uploading static content that changes 11 | # https://stackoverflow.com/questions/67845341/cloudfront-s3-etag-possible-for-cloudfront-to-send-updated-s3-object-before-t 12 | variable "cloudfront_min_ttl" { 13 | default = 0 14 | description = "The minimum TTL for the cloudfront cache" 15 | } 16 | 17 | variable "cloudfront_default_ttl" { 18 | default = 86400 19 | description = "The default TTL for the cloudfront cache" 20 | } 21 | 22 | variable "cloudfront_max_ttl" { 23 | default = 31536000 24 | description = "The maximum TTL for the cloudfront cache" 25 | } 26 | variable "tags" { 27 | default = { 28 | owner = "connext" 29 | application = "web" 30 | } 31 | } 32 | 33 | // https://docs.aws.amazon.com/AmazonCloudFront/latest/DeveloperGuide/CNAMEs.html 34 | // Cert must be in us-east-1 for cloudfront 35 | // Use *.connext.ninja cert 36 | variable "us_east_1_certificate_arn" { 37 | default = "arn:aws:acm:us-east-1:679752396206:certificate/234b80c3-623b-4afa-8ed3-3b72f0d7b712" 38 | } 39 | -------------------------------------------------------------------------------- /deploy.js: -------------------------------------------------------------------------------- 1 | const { 2 | deployContract, 3 | deployFactory, 4 | getCreate2Address, 5 | isDeployed 6 | } = require("solidity-create2-deployer"); 7 | const ethers = require("ethers"); 8 | const fetch = require('node-fetch'); 9 | const fs = require('fs') 10 | const util = require('util'); 11 | const request = require('request-promise-native') 12 | const readFile = util.promisify(fs.readFile); 13 | 14 | /* 15 | 16 | FILL IN THE BELOW 17 | 18 | * provider 19 | * verifyURL 20 | * privateKey 21 | * apikey 22 | * mpcAddress 23 | * constructorArgs 24 | 25 | */ 26 | 27 | /* 28 | 29 | PROVIDERS 30 | 31 | BSC = https://bsc-dataseed1.binance.org/ 32 | FTM = https://rpc.fantom.network 33 | xDAI =https://rpc.xdaichain.com 34 | Polygon (Matic) = https://rpc-mainnet.matic.network 35 | Heco = https://http-testnet.hecochain.com 36 | 37 | */ 38 | 39 | const provider = new ethers.providers.JsonRpcProvider("https://bsc-dataseed1.binance.org/"); 40 | const verifyURL = 'https://api.bscscan.com/api'; // api.etherscan.io for Ethereum, api.ftmscam.com for Fantom, etc 41 | const privateKey = ''; // private key of wallet being used to deploy 42 | const apikey = ''; // apiKey for etherscan / bscscan / ftmscan / etc 43 | /* 44 | 45 | MPC ADDRESS 46 | 47 | BSC = 0x533e3c0e6b48010873B947bddC4721b1bDFF9648 48 | FTM = 0xC564EE9f21Ed8A2d8E7e76c085740d5e4c5FaFbE 49 | xDAI =0x2F10c5eE93ac666dA72195abA8a49FD6D27fA02F 50 | Polygon (Matic) = 0x668b9734FfE9eE8a01d4Ade3362De71E8989EA87 51 | 52 | */ 53 | const mpcAddress = "0x533e3c0e6b48010873B947bddC4721b1bDFF9648"; 54 | const signer = new ethers.Wallet(privateKey, provider); 55 | const constructorArgs = ["Token Name", "Symbol", "decimals", "underlying", signer.address]; 56 | 57 | /* 58 | 59 | FILL IN THE ABOVE 60 | 61 | */ 62 | 63 | const salt = 2021; 64 | const factoryAddress = "0x54F5A04417E29FF5D7141a6d33cb286F50d5d50e"; 65 | 66 | const anyswapERC20 = '0x60e06040526202a3006005553480156200001857600080fd5b5060405162002f7f38038062002f7f8339810160408190526200003b91620003c5565b8451620000509060009060208801906200023d565b508351620000669060019060208701906200023d565b507fff0000000000000000000000000000000000000000000000000000000000000060f884901b166080526001600160601b0319606083901b1660a0526001600160a01b038216156200013a57816001600160a01b031663313ce5676040518163ffffffff1660e01b815260040160206040518083038186803b158015620000ed57600080fd5b505afa15801562000102573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019062000128919062000464565b60ff168360ff16146200013a57600080fd5b6004805461ff001960ff19909116600117169055600880546001600160a01b0383166001600160a01b03199182168117909255600b8054909116909117905542600c5560405146907f8b73c3c69bb8fe3d512ecc4cf759cc79239f7b179b0ffacaa9a75d522b39400f90620001b29060009062000488565b60408051918290038220828201825260018352603160f81b6020938401528151928301939093528101919091527fc89efdaa54c0f20c7adf612882df0950f5a951637e0307cdcb4c672f298b8bc66060820152608081018290523060a082015260c00160408051601f19818403018152919052805160209091012060c052506200057e945050505050565b8280546200024b906200052b565b90600052602060002090601f0160209004810192826200026f5760008555620002ba565b82601f106200028a57805160ff1916838001178555620002ba565b82800160010185558215620002ba579182015b82811115620002ba5782518255916020019190600101906200029d565b50620002c8929150620002cc565b5090565b5b80821115620002c85760008155600101620002cd565b80516001600160a01b0381168114620002fb57600080fd5b919050565b600082601f83011262000311578081fd5b81516001600160401b03808211156200032e576200032e62000568565b604051601f8301601f19908116603f0116810190828211818310171562000359576200035962000568565b8160405283815260209250868385880101111562000375578485fd5b8491505b8382101562000398578582018301518183018401529082019062000379565b83821115620003a957848385830101525b9695505050505050565b805160ff81168114620002fb57600080fd5b600080600080600060a08688031215620003dd578081fd5b85516001600160401b0380821115620003f4578283fd5b6200040289838a0162000300565b9650602088015191508082111562000418578283fd5b50620004278882890162000300565b9450506200043860408701620003b3565b92506200044860608701620002e3565b91506200045860808701620002e3565b90509295509295909350565b60006020828403121562000476578081fd5b6200048182620003b3565b9392505050565b8154600090819060028104600180831680620004a557607f831692505b6020808410821415620004c657634e487b7160e01b87526022600452602487fd5b818015620004dd5760018114620004ef576200051d565b60ff198616895284890196506200051d565b60008a815260209020885b86811015620005155781548b820152908501908301620004fa565b505084890196505b509498975050505050505050565b6002810460018216806200054057607f821691505b602082108114156200056257634e487b7160e01b600052602260045260246000fd5b50919050565b634e487b7160e01b600052604160045260246000fd5b60805160f81c60a05160601c60c05161297e620006016000396000818161048c0152611dda015260008181610590015281816113520152818161139e0152818161141e015281816116450152818161185a015281816118e301528181611bb001528181611ccd0152818161209601526120c901526000610453015261297e6000f3fe608060405234801561001057600080fd5b506004361061033f5760003560e01c80637ecebe00116101b8578063bebbf4d011610104578063d93f2445116100a2578063f75c26641161007c578063f75c266414610774578063f954734e1461077c578063fbfa77cf1461078f578063fca3b5aa146107a25761033f565b8063d93f24451461072e578063dd62ed3e14610736578063ec126c77146107615761033f565b8063cae9ca51116100de578063cae9ca51146106ed578063cfbd488514610700578063d0e30db014610713578063d505accf1461071b5761033f565b8063bebbf4d0146106be578063c3081240146106d1578063c4b740f5146106da5761033f565b806395d89b4111610171578063a29dff721161014b578063a29dff721461066c578063a9059cbb14610675578063aa271e1a14610688578063b6b55f25146106ab5761033f565b806395d89b411461063c5780639dc29fac14610644578063a045442c146106575761033f565b80637ecebe00146105d257806381a37c18146105f25780638623ec7b1461060557806387689e28146106185780638da5cb5b1461062157806391c5df49146106295761033f565b80633ccfd60b1161029257806360e232a9116102305780636a42b8f81161020a5780636a42b8f81461056f5780636e553f65146105785780636f307dc31461058b57806370a08231146105b25761033f565b806360e232a914610536578063628d6cba146105495780636817031b1461055c5761033f565b80634ca8f0ed1161026c5780634ca8f0ed146104dc57806352113ba7146104e55780635f9b105d14610510578063605629d6146105235761033f565b80633ccfd60b146104ae5780634000aea0146104b657806340c10f19146104c95761033f565b806318160ddd116102ff5780632ebe3fbb116102d95780632ebe3fbb1461041457806330adf81f14610427578063313ce5671461044e5780633644e515146104875761033f565b806318160ddd146103e657806323b872dd146103ee5780632e1a7d4d146104015761033f565b806239d6ec14610344578062bf26f41461036a578062f714ce1461039157806306fdde03146103a4578063095ea7b3146103b95780630d707df8146103dc575b600080fd5b610357610352366004612443565b6107b5565b6040519081526020015b60405180910390f35b6103577f42ce63790c28229c123925d83266e77c04d28784552ab68b350a9003226cbd5981565b61035761039f3660046125f5565b61080b565b6103ac61081f565b6040516103619190612709565b6103cc6103c736600461241a565b6108ad565b6040519015158152602001610361565b6103e4610907565b005b6103576109c3565b6103cc6103fc366004612376565b6109ca565b61035761040f3660046125c5565b610bb5565b6103e461042236600461232a565b610bca565b6103577f6e71edae12b1b97f4d1f60370fef10105fa2faae0126114a169c64845d6126c981565b6104757f000000000000000000000000000000000000000000000000000000000000000081565b60405160ff9091168152602001610361565b6103577f000000000000000000000000000000000000000000000000000000000000000081565b610357610ca1565b6103cc6104c436600461247e565b610cc2565b6103cc6104d736600461241a565b610e1b565b610357600d5481565b600b546104f8906001600160a01b031681565b6040516001600160a01b039091168152602001610361565b6103cc61051e36600461232a565b610e5d565b6103cc6105313660046123b1565b610f31565b6103cc61054436600461232a565b611141565b6103cc6105573660046125f5565b611215565b6103e461056a36600461232a565b6112dd565b61035760055481565b6103576105863660046125f5565b611343565b6104f87f000000000000000000000000000000000000000000000000000000000000000081565b6103576105c036600461232a565b60026020526000908152604090205481565b6103576105e036600461232a565b600f6020526000908152604090205481565b610357610600366004612500565b611384565b6104f86106133660046125c5565b61145e565b610357600c5481565b6104f8611488565b6009546104f8906001600160a01b031681565b6103ac611492565b6103cc61065236600461241a565b61149f565b61065f6114fe565b60405161036191906126bc565b610357600e5481565b6103cc61068336600461241a565b611560565b6103cc61069636600461232a565b60066020526000908152604090205460ff1681565b6103576106b93660046125c5565b611636565b6103576106cc3660046125f5565b611677565b610357600a5481565b6103e46106e8366004612569565b6116b1565b6103cc6106fb36600461247e565b611703565b6103e461070e36600461232a565b6117df565b610357611838565b6103e46107293660046123b1565b61191b565b6103e4611a89565b610357610744366004612344565b601060209081526000928352604080842090915290825290205481565b6103cc61076f3660046125a1565b611af4565b6104f8611b69565b61035761078a366004612500565b611b96565b6008546104f8906001600160a01b031681565b6103e46107b036600461232a565b611c4e565b60006107bf611b69565b6001600160a01b0316336001600160a01b0316146107f85760405162461bcd60e51b81526004016107ef9061273c565b60405180910390fd5b610803848484611cb4565b949350505050565b6000610818338484611cb4565b9392505050565b6000805461082c9061288b565b80601f01602080910402602001604051908101604052809291908181526020018280546108589061288b565b80156108a55780601f1061087a576101008083540402835291602001916108a5565b820191906000526020600020905b81548152906001019060200180831161088857829003601f168201915b505050505081565b3360008181526010602090815260408083206001600160a01b03871680855292528083208590555191929091600080516020612929833981519152906108f69086815260200190565b60405180910390a350600192915050565b61090f611b69565b6001600160a01b0316336001600160a01b03161461093f5760405162461bcd60e51b81526004016107ef9061273c565b600a5442101561094e57600080fd5b600980546001600160a01b039081166000908152600660205260408120805460ff1916600190811790915592546007805494850181559091527fa66cc928b5edb82af9bd49922954155ab7b0942694bea4ce44661d9a8736c68890920180546001600160a01b03191692909116919091179055565b6003545b90565b60006001600160a01b0383161515806109ec57506001600160a01b0383163014155b6109f557600080fd5b6001600160a01b0384163314610aef576001600160a01b03841660009081526010602090815260408083203384529091529020546000198114610aed5782811015610a945760405162461bcd60e51b815260206004820152602960248201527f416e7973776170563345524332303a2072657175657374206578636565647320604482015268616c6c6f77616e636560b81b60648201526084016107ef565b6000610aa08483612848565b6001600160a01b03871660008181526010602090815260408083203380855290835292819020859055518481529394509092600080516020612929833981519152910160405180910390a3505b505b6001600160a01b03841660009081526002602052604090205482811015610b285760405162461bcd60e51b81526004016107ef906127aa565b610b328382612848565b6001600160a01b038087166000908152600260205260408082209390935590861681529081208054859290610b68908490612830565b92505081905550836001600160a01b0316856001600160a01b031660008051602061290983398151915285604051610ba291815260200190565b60405180910390a3506001949350505050565b6000610bc2338333611cb4565b90505b919050565b610bd2611b69565b6001600160a01b0316336001600160a01b031614610c025760405162461bcd60e51b81526004016107ef9061273c565b60045460ff16610c1157600080fd5b600880546001600160a01b039092166001600160a01b03199283168117909155600b80548316821790556000818152600660205260408120805460ff1990811660019081179092556007805492830181559092527fa66cc928b5edb82af9bd49922954155ab7b0942694bea4ce44661d9a8736c68801805490931690911790915542600c55600480549091169055565b336000818152600260205260408120549091610cbd9181611cb4565b905090565b60006001600160a01b038516151580610ce457506001600160a01b0385163014155b610ced57600080fd5b3360009081526002602052604090205484811015610d1d5760405162461bcd60e51b81526004016107ef906127aa565b610d278582612848565b33600090815260026020526040808220929092556001600160a01b03881681529081208054879290610d5a908490612830565b90915550506040518581526001600160a01b0387169033906000805160206129098339815191529060200160405180910390a3604051635260769b60e11b81526001600160a01b0387169063a4c0ed3690610dbf903390899089908990600401612674565b602060405180830381600087803b158015610dd957600080fd5b505af1158015610ded573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610e119190612585565b9695505050505050565b3360009081526006602052604081205460ff16610e4a5760405162461bcd60e51b81526004016107ef906127f9565b610e548383611cfc565b50600192915050565b6000610e67611b69565b6001600160a01b0316336001600160a01b031614610e975760405162461bcd60e51b81526004016107ef9061273c565b6001600160a01b038216610ebd5760405162461bcd60e51b81526004016107ef90612773565b600b80546001600160a01b0319166001600160a01b038416179055600554610ee59042612830565b600c819055600b546008546040516001600160a01b0392831692909116907f1d065115f314fb9bad9557bd5460b9e3c66f7223b1dd04e73e828f0bb5afe89f90600090a4506001919050565b600084421115610f835760405162461bcd60e51b815260206004820152601e60248201527f416e7973776170563345524332303a2045787069726564207065726d6974000060448201526064016107ef565b6001600160a01b0388166000908152600f6020526040812080547f42ce63790c28229c123925d83266e77c04d28784552ab68b350a9003226cbd59918b918b918b919086610fd0836128c6565b909155506040805160208101969096526001600160a01b0394851690860152929091166060840152608083015260a082015260c0810187905260e0016040516020818303038152906040528051906020012090506110318982878787611dca565b8061104457506110448982878787611eba565b61104d57600080fd5b6001600160a01b03881615158061106d57506001600160a01b0388163014155b61107657600080fd5b6001600160a01b038916600090815260026020526040902054878110156110af5760405162461bcd60e51b81526004016107ef906127aa565b6110b98882612848565b6001600160a01b03808c1660009081526002602052604080822093909355908b16815290812080548a92906110ef908490612830565b92505081905550886001600160a01b03168a6001600160a01b03166000805160206129098339815191528a60405161112991815260200190565b60405180910390a35060019998505050505050505050565b600061114b611b69565b6001600160a01b0316336001600160a01b03161461117b5760405162461bcd60e51b81526004016107ef9061273c565b6001600160a01b0382166111a15760405162461bcd60e51b81526004016107ef90612773565b600b80546001600160a01b0319166001600160a01b0384161790556005546111c99042612830565b600c819055600b546008546040516001600160a01b0392831692909116907f5c364079e7102c27c608f9b237c735a1b7bfa0b67f27c2ad26bad447bf965cac90600090a4506001919050565b600454600090610100900460ff16156112705760405162461bcd60e51b815260206004820152601860248201527f416e7973776170563445524332303a206f6e6c7941757468000000000000000060448201526064016107ef565b6001600160a01b0382166112965760405162461bcd60e51b81526004016107ef90612773565b6112a03384611f4f565b6040518381526001600160a01b0383169033907f6b616089d04950dc06c45c6dd787d657980543f89651aec47924752c7d16c888906020016108f6565b6112e5611b69565b6001600160a01b0316336001600160a01b0316146113155760405162461bcd60e51b81526004016107ef9061273c565b600b80546001600160a01b0319166001600160a01b03831617905560055461133d9042612830565b600c5550565b600061137a6001600160a01b037f000000000000000000000000000000000000000000000000000000000000000016333086612021565b6108188383612092565b60405163d505accf60e01b81526000906001600160a01b037f0000000000000000000000000000000000000000000000000000000000000000169063d505accf906113df908b9030908c908c908c908c908c90600401612633565b600060405180830381600087803b1580156113f957600080fd5b505af115801561140d573d6000803e3d6000fd5b506114489250506001600160a01b037f000000000000000000000000000000000000000000000000000000000000000016905089308a612021565b6114528783612092565b98975050505050505050565b6007818154811061146e57600080fd5b6000918252602090912001546001600160a01b0316905081565b6000610cbd611b69565b6001805461082c9061288b565b3360009081526006602052604081205460ff166114ce5760405162461bcd60e51b81526004016107ef906127f9565b6001600160a01b0383166114f45760405162461bcd60e51b81526004016107ef90612773565b610e548383611f4f565b6060600780548060200260200160405190810160405280929190818152602001828054801561155657602002820191906000526020600020905b81546001600160a01b03168152600190910190602001808311611538575b5050505050905090565b60006001600160a01b03831615158061158257506001600160a01b0383163014155b61158b57600080fd5b33600090815260026020526040902054828110156115bb5760405162461bcd60e51b81526004016107ef906127aa565b6115c58382612848565b33600090815260026020526040808220929092556001600160a01b038616815290812080548592906115f8908490612830565b90915550506040518381526001600160a01b038516903390600080516020612909833981519152906020015b60405180910390a35060019392505050565b600061166d6001600160a01b037f000000000000000000000000000000000000000000000000000000000000000016333085612021565b610bc28233612092565b6000611681611b69565b6001600160a01b0316336001600160a01b03161461137a5760405162461bcd60e51b81526004016107ef9061273c565b6116b9611b69565b6001600160a01b0316336001600160a01b0316146116e95760405162461bcd60e51b81526004016107ef9061273c565b600480549115156101000261ff0019909216919091179055565b3360008181526010602090815260408083206001600160a01b038916808552925280832087905551919290916000805160206129298339815191529061174c9088815260200190565b60405180910390a360405162ba451f60e01b81526001600160a01b0386169062ba451f90611784903390889088908890600401612674565b602060405180830381600087803b15801561179e57600080fd5b505af11580156117b2573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906117d69190612585565b95945050505050565b6117e7611b69565b6001600160a01b0316336001600160a01b0316146118175760405162461bcd60e51b81526004016107ef9061273c565b6001600160a01b03166000908152600660205260409020805460ff19169055565b6040516370a0823160e01b815233600482015260009081906001600160a01b037f000000000000000000000000000000000000000000000000000000000000000016906370a082319060240160206040518083038186803b15801561189c57600080fd5b505afa1580156118b0573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906118d491906125dd565b905061190b6001600160a01b037f000000000000000000000000000000000000000000000000000000000000000016333084612021565b6119158133612092565b91505090565b8342111561196b5760405162461bcd60e51b815260206004820152601e60248201527f416e7973776170563345524332303a2045787069726564207065726d6974000060448201526064016107ef565b6001600160a01b0387166000908152600f6020526040812080547f6e71edae12b1b97f4d1f60370fef10105fa2faae0126114a169c64845d6126c9918a918a918a9190866119b8836128c6565b909155506040805160208101969096526001600160a01b0394851690860152929091166060840152608083015260a082015260c0810186905260e001604051602081830303815290604052805190602001209050611a198882868686611dca565b80611a2c5750611a2c8882868686611eba565b611a3557600080fd5b6001600160a01b038881166000818152601060209081526040808320948c16808452948252918290208a90559051898152600080516020612929833981519152910160405180910390a35050505050505050565b611a91611b69565b6001600160a01b0316336001600160a01b031614611ac15760405162461bcd60e51b81526004016107ef9061273c565b600c54421015611ad057600080fd5b600b54600880546001600160a01b0319166001600160a01b03909216919091179055565b3360009081526006602052604081205460ff16611b235760405162461bcd60e51b81526004016107ef906127f9565b611b2d8383611cfc565b826001600160a01b0316847f05d0634fe981be85c22e2942a880821b70095d84e152c3ea3c17a4e4250d9d618460405161162491815260200190565b6000600c544210611b865750600b546001600160a01b03166109c7565b506008546001600160a01b031690565b60405163302b14eb60e11b81526000906001600160a01b037f0000000000000000000000000000000000000000000000000000000000000000169063605629d690611bf1908b9030908c908c908c908c908c90600401612633565b602060405180830381600087803b158015611c0b57600080fd5b505af1158015611c1f573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611c439190612585565b506114528783612092565b611c56611b69565b6001600160a01b0316336001600160a01b031614611c865760405162461bcd60e51b81526004016107ef9061273c565b600980546001600160a01b0319166001600160a01b038316179055600554611cae9042612830565b600a5550565b6000611cc08484611f4f565b611cf46001600160a01b037f000000000000000000000000000000000000000000000000000000000000000016838561210f565b509092915050565b6001600160a01b038216611d525760405162461bcd60e51b815260206004820152601f60248201527f45524332303a206d696e7420746f20746865207a65726f20616464726573730060448201526064016107ef565b8060036000828254611d649190612830565b90915550506001600160a01b03821660009081526002602052604081208054839290611d91908490612830565b90915550506040518181526001600160a01b03831690600090600080516020612909833981519152906020015b60405180910390a35050565b60405161190160f01b60208201527f0000000000000000000000000000000000000000000000000000000000000000602282015260428101859052600090819060620160408051601f198184030181528282528051602091820120600080855291840180845281905260ff89169284019290925260608301879052608083018690529092509060019060a0015b6020604051602081039080840390855afa158015611e79573d6000803e3d6000fd5b5050604051601f1901519150506001600160a01b038116158015906114525750876001600160a01b0316816001600160a01b03161498975050505050505050565b600080611f14866040517f19457468657265756d205369676e6564204d6573736167653a0a3332000000006020820152603c8101829052600090605c01604051602081830303815290604052805190602001209050919050565b6040805160008082526020820180845284905260ff89169282019290925260608101879052608081018690529192509060019060a001611e57565b6001600160a01b038216611faf5760405162461bcd60e51b815260206004820152602160248201527f45524332303a206275726e2066726f6d20746865207a65726f206164647265736044820152607360f81b60648201526084016107ef565b6001600160a01b03821660009081526002602052604081208054839290611fd7908490612848565b925050819055508060036000828254611ff09190612848565b90915550506040518181526000906001600160a01b0384169060008051602061290983398151915290602001611dbe565b6040516001600160a01b038085166024830152831660448201526064810182905261208c9085906323b872dd60e01b906084015b60408051601f198184030181529190526020810180516001600160e01b03166001600160e01b031990931692909217909152612144565b50505050565b60007f00000000000000000000000000000000000000000000000000000000000000006001600160a01b0316158015906120f557507f00000000000000000000000000000000000000000000000000000000000000006001600160a01b03163014155b6120fe57600080fd5b6121088284611cfc565b5090919050565b6040516001600160a01b03831660248201526044810182905261213f90849063a9059cbb60e01b90606401612055565b505050565b612156826001600160a01b03166122cb565b6121a25760405162461bcd60e51b815260206004820152601f60248201527f5361666545524332303a2063616c6c20746f206e6f6e2d636f6e74726163740060448201526064016107ef565b600080836001600160a01b0316836040516121bd9190612617565b6000604051808303816000865af19150503d80600081146121fa576040519150601f19603f3d011682016040523d82523d6000602084013e6121ff565b606091505b5091509150816122515760405162461bcd60e51b815260206004820181905260248201527f5361666545524332303a206c6f772d6c6576656c2063616c6c206661696c656460448201526064016107ef565b80511561208c578080602001905181019061226c9190612585565b61208c5760405162461bcd60e51b815260206004820152602a60248201527f5361666545524332303a204552433230206f7065726174696f6e20646964206e6044820152691bdd081cdd58d8d9595960b21b60648201526084016107ef565b6000813f7fc5d2460186f7233c927e7db2dcc703c0e500b653ca82273b7bfad8045d85a47081158015906108035750141592915050565b80356001600160a01b0381168114610bc557600080fd5b803560ff81168114610bc557600080fd5b60006020828403121561233b578081fd5b61081882612302565b60008060408385031215612356578081fd5b61235f83612302565b915061236d60208401612302565b90509250929050565b60008060006060848603121561238a578081fd5b61239384612302565b92506123a160208501612302565b9150604084013590509250925092565b600080600080600080600060e0888a0312156123cb578283fd5b6123d488612302565b96506123e260208901612302565b955060408801359450606088013593506123fe60808901612319565b925060a0880135915060c0880135905092959891949750929550565b6000806040838503121561242c578182fd5b61243583612302565b946020939093013593505050565b600080600060608486031215612457578283fd5b61246084612302565b92506020840135915061247560408501612302565b90509250925092565b60008060008060608587031215612493578384fd5b61249c85612302565b935060208501359250604085013567ffffffffffffffff808211156124bf578384fd5b818701915087601f8301126124d2578384fd5b8135818111156124e0578485fd5b8860208285010111156124f1578485fd5b95989497505060200194505050565b600080600080600080600060e0888a03121561251a578283fd5b61252388612302565b9650602088013595506040880135945061253f60608901612319565b93506080880135925060a0880135915061255b60c08901612302565b905092959891949750929550565b60006020828403121561257a578081fd5b8135610818816128f7565b600060208284031215612596578081fd5b8151610818816128f7565b6000806000606084860312156125b5578283fd5b833592506123a160208501612302565b6000602082840312156125d6578081fd5b5035919050565b6000602082840312156125ee578081fd5b5051919050565b60008060408385031215612607578182fd5b8235915061236d60208401612302565b6000825161262981846020870161285f565b9190910192915050565b6001600160a01b0397881681529590961660208601526040850193909352606084019190915260ff16608083015260a082015260c081019190915260e00190565b6001600160a01b0385168152602081018490526060604082018190528101829052600082846080840137818301608090810191909152601f909201601f191601019392505050565b6020808252825182820181905260009190848201906040850190845b818110156126fd5783516001600160a01b0316835292840192918401916001016126d8565b50909695505050505050565b600060208252825180602084015261272881604085016020870161285f565b601f01601f19169190910160400192915050565b60208082526019908201527f416e7973776170563345524332303a20464f5242494444454e00000000000000604082015260600190565b6020808252601c908201527f416e7973776170563345524332303a2061646472657373283078302900000000604082015260600190565b6020808252602f908201527f416e7973776170563345524332303a207472616e7366657220616d6f756e742060408201526e657863656564732062616c616e636560881b606082015260800190565b60208082526019908201527f416e7973776170563445524332303a20464f5242494444454e00000000000000604082015260600190565b60008219821115612843576128436128e1565b500190565b60008282101561285a5761285a6128e1565b500390565b60005b8381101561287a578181015183820152602001612862565b8381111561208c5750506000910152565b60028104600182168061289f57607f821691505b602082108114156128c057634e487b7160e01b600052602260045260246000fd5b50919050565b60006000198214156128da576128da6128e1565b5060010190565b634e487b7160e01b600052601160045260246000fd5b801515811461290557600080fd5b5056feddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925a26469706673582212208419b2ad269a82ca3ad876aff3c46be03a8dbfa4d02646df103fd48e9bce340c64736f6c63430008020033'; 67 | 68 | const anyswapERC20ABI = '[{"inputs":[{"internalType":"string","name":"_name","type":"string"},{"internalType":"string","name":"_symbol","type":"string"},{"internalType":"uint8","name":"_decimals","type":"uint8"},{"internalType":"address","name":"_underlying","type":"address"},{"internalType":"address","name":"_vault","type":"address"}],"stateMutability":"nonpayable","type":"constructor"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"owner","type":"address"},{"indexed":true,"internalType":"address","name":"spender","type":"address"},{"indexed":false,"internalType":"uint256","name":"value","type":"uint256"}],"name":"Approval","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"auth","type":"address"},{"indexed":false,"internalType":"uint256","name":"timestamp","type":"uint256"}],"name":"LogAddAuth","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"oldOwner","type":"address"},{"indexed":true,"internalType":"address","name":"newOwner","type":"address"},{"indexed":true,"internalType":"uint256","name":"effectiveHeight","type":"uint256"}],"name":"LogChangeMPCOwner","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"oldVault","type":"address"},{"indexed":true,"internalType":"address","name":"newVault","type":"address"},{"indexed":true,"internalType":"uint256","name":"effectiveTime","type":"uint256"}],"name":"LogChangeVault","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"bytes32","name":"txhash","type":"bytes32"},{"indexed":true,"internalType":"address","name":"account","type":"address"},{"indexed":false,"internalType":"uint256","name":"amount","type":"uint256"}],"name":"LogSwapin","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"account","type":"address"},{"indexed":true,"internalType":"address","name":"bindaddr","type":"address"},{"indexed":false,"internalType":"uint256","name":"amount","type":"uint256"}],"name":"LogSwapout","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"from","type":"address"},{"indexed":true,"internalType":"address","name":"to","type":"address"},{"indexed":false,"internalType":"uint256","name":"value","type":"uint256"}],"name":"Transfer","type":"event"},{"inputs":[],"name":"DOMAIN_SEPARATOR","outputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"PERMIT_TYPEHASH","outputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"bytes32","name":"txhash","type":"bytes32"},{"internalType":"address","name":"account","type":"address"},{"internalType":"uint256","name":"amount","type":"uint256"}],"name":"Swapin","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"amount","type":"uint256"},{"internalType":"address","name":"bindaddr","type":"address"}],"name":"Swapout","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"TRANSFER_TYPEHASH","outputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"","type":"address"},{"internalType":"address","name":"","type":"address"}],"name":"allowance","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"applyMinter","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"applyVault","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"spender","type":"address"},{"internalType":"uint256","name":"value","type":"uint256"}],"name":"approve","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"spender","type":"address"},{"internalType":"uint256","name":"value","type":"uint256"},{"internalType":"bytes","name":"data","type":"bytes"}],"name":"approveAndCall","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"","type":"address"}],"name":"balanceOf","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"from","type":"address"},{"internalType":"uint256","name":"amount","type":"uint256"}],"name":"burn","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"newVault","type":"address"}],"name":"changeMPCOwner","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"newVault","type":"address"}],"name":"changeVault","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"decimals","outputs":[{"internalType":"uint8","name":"","type":"uint8"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"delay","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"delayDelay","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"delayMinter","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"delayVault","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"amount","type":"uint256"},{"internalType":"address","name":"to","type":"address"}],"name":"deposit","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"amount","type":"uint256"}],"name":"deposit","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"deposit","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"amount","type":"uint256"},{"internalType":"address","name":"to","type":"address"}],"name":"depositVault","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"target","type":"address"},{"internalType":"uint256","name":"value","type":"uint256"},{"internalType":"uint256","name":"deadline","type":"uint256"},{"internalType":"uint8","name":"v","type":"uint8"},{"internalType":"bytes32","name":"r","type":"bytes32"},{"internalType":"bytes32","name":"s","type":"bytes32"},{"internalType":"address","name":"to","type":"address"}],"name":"depositWithPermit","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"target","type":"address"},{"internalType":"uint256","name":"value","type":"uint256"},{"internalType":"uint256","name":"deadline","type":"uint256"},{"internalType":"uint8","name":"v","type":"uint8"},{"internalType":"bytes32","name":"r","type":"bytes32"},{"internalType":"bytes32","name":"s","type":"bytes32"},{"internalType":"address","name":"to","type":"address"}],"name":"depositWithTransferPermit","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"getAllMinters","outputs":[{"internalType":"address[]","name":"","type":"address[]"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"_vault","type":"address"}],"name":"initVault","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"","type":"address"}],"name":"isMinter","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256","name":"amount","type":"uint256"}],"name":"mint","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"","type":"uint256"}],"name":"minters","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"mpc","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"name","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"","type":"address"}],"name":"nonces","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"owner","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"pendingDelay","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"pendingMinter","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"pendingVault","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"target","type":"address"},{"internalType":"address","name":"spender","type":"address"},{"internalType":"uint256","name":"value","type":"uint256"},{"internalType":"uint256","name":"deadline","type":"uint256"},{"internalType":"uint8","name":"v","type":"uint8"},{"internalType":"bytes32","name":"r","type":"bytes32"},{"internalType":"bytes32","name":"s","type":"bytes32"}],"name":"permit","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_auth","type":"address"}],"name":"revokeMinter","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_auth","type":"address"}],"name":"setMinter","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_vault","type":"address"}],"name":"setVault","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bool","name":"enabled","type":"bool"}],"name":"setVaultOnly","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"symbol","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"totalSupply","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256","name":"value","type":"uint256"}],"name":"transfer","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256","name":"value","type":"uint256"},{"internalType":"bytes","name":"data","type":"bytes"}],"name":"transferAndCall","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"from","type":"address"},{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256","name":"value","type":"uint256"}],"name":"transferFrom","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"target","type":"address"},{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256","name":"value","type":"uint256"},{"internalType":"uint256","name":"deadline","type":"uint256"},{"internalType":"uint8","name":"v","type":"uint8"},{"internalType":"bytes32","name":"r","type":"bytes32"},{"internalType":"bytes32","name":"s","type":"bytes32"}],"name":"transferWithPermit","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"underlying","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"vault","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"amount","type":"uint256"},{"internalType":"address","name":"to","type":"address"}],"name":"withdraw","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"amount","type":"uint256"}],"name":"withdraw","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"withdraw","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"from","type":"address"},{"internalType":"uint256","name":"amount","type":"uint256"},{"internalType":"address","name":"to","type":"address"}],"name":"withdrawVault","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"nonpayable","type":"function"}]'; 69 | 70 | const factoryABI = '[{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"addr","type":"address"},{"indexed":false,"internalType":"uint256","name":"salt","type":"uint256"}],"name":"Deployed","type":"event"},{"inputs":[{"internalType":"bytes","name":"code","type":"bytes"},{"internalType":"uint256","name":"salt","type":"uint256"}],"name":"deploy","outputs":[],"stateMutability":"nonpayable","type":"function"}]'; 71 | 72 | //string memory _name, string memory _symbol, uint8 _decimals, address _underlying, address _vault 73 | const constructorTypes = ["string", "string", "uint8", "address", "address"]; 74 | const factory = new ethers.Contract(factoryAddress, factoryABI, signer); 75 | const constructor = encodeParam( 76 | constructorTypes, 77 | constructorArgs 78 | ).slice(2) 79 | console.log(constructor); 80 | const bytecode = `${anyswapERC20}${constructor}`; 81 | // encodes parameter to pass as contract argument 82 | function encodeParam(dataType, data) { 83 | const abiCoder = ethers.utils.defaultAbiCoder; 84 | return abiCoder.encode(dataType, data); 85 | } 86 | 87 | function buildCreate2Address(creatorAddress, saltHex, byteCode) { 88 | return `0x${ethers.utils 89 | .keccak256( 90 | `0x${["ff", creatorAddress, saltHex, ethers.utils.keccak256(byteCode)] 91 | .map(x => x.replace(/0x/, "")) 92 | .join("")}` 93 | ) 94 | .slice(-40)}`.toLowerCase(); 95 | } 96 | 97 | // converts an int to uint256 98 | function numberToUint256(value) { 99 | const hex = value.toString(16); 100 | return `0x${"0".repeat(64 - hex.length)}${hex}`; 101 | } 102 | 103 | // returns true if contract is deployed on-chain 104 | async function isContract(address) { 105 | const code = await provider.getCode(address); 106 | return code.slice(2).length > 0; 107 | } 108 | 109 | setup() 110 | 111 | async function setup() { 112 | // First see if already deployed 113 | const computedAddr = buildCreate2Address( 114 | factoryAddress, 115 | numberToUint256(salt), 116 | bytecode 117 | ); 118 | console.log(computedAddr) 119 | 120 | const isDeployed = await isContract(computedAddr); 121 | if (!isDeployed) { 122 | await (await factory.deploy(bytecode, salt)).wait(); 123 | } 124 | 125 | const anyswap = new ethers.Contract(computedAddr, anyswapERC20ABI, signer); 126 | const vault = await anyswap.vault(); 127 | if (vault !== mpcAddress) { 128 | await (await anyswap.initVault(mpcAddress)).wait(); 129 | } 130 | verify(computedAddr, constructor); 131 | } 132 | 133 | 134 | async function verify(contractAddress, constructorABI) { 135 | const sourceCode = await readFile('./AnyswapV4ERC20.sol').toString(); 136 | 137 | request 138 | .post({ 139 | method: 'POST', 140 | url: verifyURL, 141 | form: { 142 | apikey: apikey, 143 | module: 'contract', 144 | action: 'verifysourcecode', 145 | contractaddress: contractAddress, 146 | sourceCode: sourceCode, 147 | contractname: 'AnyswapV4ERC20.sol:AnyswapV4ERC20', 148 | compilerversion: 'v0.8.2+commit.661d1103', 149 | optimizationUsed: 1, 150 | runs: 200, 151 | constructorArguements: constructorABI, //if applicable 152 | licenseType: 7, //Valid codes 1-12 where 1=No License .. 12=Apache 2.0, see https://BscScan.com/contract-license-types 153 | } 154 | }).then(res => console.log(res)) 155 | .catch(err => console.log(err)); 156 | } 157 | 158 | async function checkCode() { 159 | const computedAddr = buildCreate2Address( 160 | factoryAddress, 161 | numberToUint256(salt), 162 | bytecode 163 | ); 164 | console.log(await isContract(computedAddr)); 165 | } 166 | 167 | async function mpc() { 168 | const computedAddr = buildCreate2Address( 169 | factoryAddress, 170 | numberToUint256(salt), 171 | bytecode 172 | ); 173 | const anyswap = new ethers.Contract(computedAddr, anyswapERC20ABI, signer); 174 | const result = await (await anyswap.changeMPCOwner(mpcAddress)).wait(); 175 | console.log(result.transactionHash); 176 | } 177 | 178 | async function run() { 179 | const result = await (await factory.deploy(bytecode, salt)).wait(); 180 | 181 | const addr = result.events[0].args.addr.toLowerCase(); 182 | console.log(result.transactionHash); 183 | console.log(addr); 184 | } 185 | 186 | -------------------------------------------------------------------------------- /deploy.md: -------------------------------------------------------------------------------- 1 | # Deploying your own cross-chain token 101 2 | 3 | ## Prerequisites 4 | 5 | * Token & Logo data available on [coingecko.com](https://www.coingecko.com/en) 6 | 7 | ## Step 1: Fork AnyswapV5ERC20 and implement any additional functionality as required. 8 | 9 | AnyswapV4ERC20 supports the following 10 | * ERC2612 (Adds `permit`) 11 | * ERC677 (Adds `approveAndCall` and `transferAndCall`) 12 | * `transferWithPermit` 13 | * Verify EIP712 and Verify `personalSign` 14 | * AnyswapV4ERC20 needs to support `mint`, `burn`, `Swapin`, and `Swapout` to be compatible with multiple bridges. 15 | * Multichain MPC address (detailed below) should be set via `initVault(address _vault)` 16 | 17 | ### Step 1.1: I already deployed my token 18 | 19 | Deploy a wrapper for your token that supports `mint`, `burn`, `Swapin`, and `Swapout`, add this wrapper as a minter role in the ACL. In the wrapper add the MPC address (found below) as a minter 20 | 21 | ## Step 2: Deploy AnyswapV5ERC20 via AnyswapCREATE2 22 | 23 | AnyswapCREATE2 is available on Ethereum, Fantom, Binance Smart Chain, xDAI, and Matic. More deployments to follow 24 | 25 | Address: 0x54f5a04417e29ff5d7141a6d33cb286f50d5d50e 26 | 27 | ``` 28 | git clone https://github.com/connext/chaindata.git 29 | npm install 30 | -- edit deploy.js 31 | node deploy.js 32 | ``` 33 | 34 | Edit lines 39 to 55 35 | 36 | ``` 37 | provider ~ choose from provider list for the chain 38 | privateKey ~ address being used to deploy with 39 | mpcAddress ~ address for MPC address on given chain 40 | constructorArgs ~ token details (Token Name, Symbol, Decimals, Underlying token (optional)) 41 | verifyURL (optional) if you want to programmatically verify via etherscan/ftmscan/bscscan api 42 | verifykey (optional) key to be used to verify via etherscan/ftmscan/bscscan 43 | ``` 44 | 45 | Deploy with the same code and salt to all the chains you wish to have your token on. 46 | 47 | **NOTE** if you prefer to manually deploy, be sure to immediately call initVault(address _mpc) on the contract, as the default owner should be set to the deployer so the code matches on all deployments. Not even the constructor arguments should change on cross-chain deployments 48 | 49 | ## Step 3: Verify your contract on each individual chain (optional if deploy.js was not used) 50 | 51 | Verify via; 52 | 53 | * [Ethereum](https://etherscan.io/) 54 | * [Binance Smart Chain](https://bscscan.com/) 55 | * [Fantom](https://ftmscan.com/) 56 | * [xDAI](https://blockscout.com/poa/xdai) 57 | * [Polygon (Matic)](https://explorer-mainnet.maticvigil.com/) 58 | 59 | ## Step 4: Create a PR for your token into the token registry 60 | 61 | Clone the connext/chaindata repo and submit a PR to chains.json with the following format; 62 | 63 | ```json 64 | "yfi": { 65 | "srcChainID": "1", 66 | "destChainID": "56", 67 | "PairID": "YFI", 68 | "SrcToken": { 69 | "ID": "YFI", 70 | "Name": "yearn.finance", 71 | "Symbol": "YFI", 72 | "Decimals": 18, 73 | "Description": "yearn.finance", 74 | "DepositAddress": "0x13B432914A996b0A48695dF9B2d701edA45FF264", 75 | "mpcAddress": "0x13B432914A996b0A48695dF9B2d701edA45FF264", 76 | "ContractAddress": "0x0bc529c00C6401aEF6D220BE8C6Ea1667F6Ad93e", 77 | "MaximumSwap": 20, 78 | "MinimumSwap": 0.0005, 79 | "BigValueThreshold": 5, 80 | "SwapFeeRate": 0, 81 | "MaximumSwapFee": 0, 82 | "MinimumSwapFee": 0, 83 | "PlusGasPricePercentage": 10, 84 | "DisableSwap": false, 85 | "IsDelegateContract": false 86 | }, 87 | "DestToken": { 88 | "ID": "anyYFI", 89 | "Name": "YFI-ERC20", 90 | "Symbol": "anyYFI", 91 | "Decimals": 18, 92 | "Description": "cross chain bridge YFI with anyYFI", 93 | "mpcAddress": "0x13B432914A996b0A48695dF9B2d701edA45FF264", 94 | "ContractAddress": "0x9883ae441105f815b472517389b979f031b5c87e", 95 | "MaximumSwap": 20, 96 | "MinimumSwap": 0.002, 97 | "BigValueThreshold": 2, 98 | "SwapFeeRate": 0.001, 99 | "MaximumSwapFee": 0.01, 100 | "MinimumSwapFee": 0.001, 101 | "PlusGasPricePercentage": 1, 102 | "DisableSwap": false, 103 | "IsDelegateContract": false 104 | } 105 | } 106 | ``` 107 | 108 | If you are not sure on the chainID, you can confirm them on [chainid.network](https://chainid.network/chains.json) 109 | Once the PR is accepted, the token will be merged and become available on [multichain.xyz](https://multichain.xyz/) 110 | -------------------------------------------------------------------------------- /everclear.json: -------------------------------------------------------------------------------- 1 | { 2 | "hub": { 3 | "domain": "25327", 4 | "network": "evm", 5 | "deployments": { 6 | "everclear": "0xa05A3380889115bf313f1Db9d5f335157Be4D816", 7 | "gateway": "0xEFfAB7cCEBF63FbEFB4884964b12259d4374FaAa", 8 | "gauge": "0x9831fE53Ca8A16b950c17fBC4C12289a61aF06A5", 9 | "rewardDistributor": "0xFBe70488c65cA4C5445f44f496ba034A126cF0b4", 10 | "tokenomicsHubGateway": "0xEc86D47d98EeeF824Ff79fAE2cFA3Fd57Ab87F9D" 11 | }, 12 | "providers": [ 13 | "https://rpc.everclear.raas.gelato.cloud" 14 | ], 15 | "subgraphUrls": [ 16 | "https://api.goldsky.com/api/public/project_clssc64y57n5r010yeoly05up/subgraphs/everclear-hub/production-v0.0.3/gn" 17 | ], 18 | "confirmations": 0, 19 | "assets": { 20 | "ETH": { 21 | "symbol": "ETH", 22 | "address": "0x0000000000000000000000000000000000000000", 23 | "decimals": 18, 24 | "tickerHash": "0xaaaebeba3810b1e6b70781f14b2d72c1cb89c0b2b320c43bb67ff79f562f5ff4", 25 | "isNative": true, 26 | "price": { 27 | "isStable": false, 28 | "coingeckoId": "ethereum", 29 | "mainnetEquivalent": "0x0000000000000000000000000000000000000000" 30 | } 31 | }, 32 | "WETH": { 33 | "symbol": "WETH", 34 | "address": "0x2e31ebD2eB114943630Db6ba8c7f7687bdA5835F", 35 | "decimals": 18, 36 | "tickerHash": "0x0f8a193ff464434486c0daf7db2a895884365d2bc84ba47a68fcf89c1b14b5b8", 37 | "isNative": false, 38 | "price": { 39 | "isStable": false, 40 | "coingeckoId": "ethereum" 41 | } 42 | }, 43 | "CLEAR": { 44 | "symbol": "CLEAR", 45 | "address": "0x58b9cB810A68a7f3e1E4f8Cb45D1B9B3c79705E8", 46 | "decimals": 18, 47 | "tickerHash": "0x06ac253a00ee13562eecafc06057c6db73566a05bdce988194aad3616e28e87c", 48 | "isNative": false, 49 | "price": { 50 | "isStable": false, 51 | "coingeckoId": "connext" 52 | } 53 | } 54 | } 55 | }, 56 | "chains": { 57 | "1": { 58 | "network": "evm", 59 | "providers": [ 60 | "https://mainnet.gateway.tenderly.co" 61 | ], 62 | "subgraphUrls": [ 63 | "https://api.goldsky.com/api/public/project_clssc64y57n5r010yeoly05up/subgraphs/everclear-spoke-mainnet/production-v0.0.5/gn" 64 | ], 65 | "deployments": { 66 | "everclear": "0xa05A3380889115bf313f1Db9d5f335157Be4D816", 67 | "gateway": "0x9ADA72CCbAfe94248aFaDE6B604D1bEAacc899A7", 68 | "XERC20Module": "0xD1daF260951B8d350a4AeD5C80d74Fd7298C93F4" 69 | }, 70 | "confirmations": 10, 71 | "assets": { 72 | "ETH": { 73 | "symbol": "ETH", 74 | "address": "0x0000000000000000000000000000000000000000", 75 | "decimals": 18, 76 | "tickerHash": "0xaaaebeba3810b1e6b70781f14b2d72c1cb89c0b2b320c43bb67ff79f562f5ff4", 77 | "isNative": true, 78 | "price": { 79 | "isStable": false, 80 | "priceFeed": "0x5f4eC3Df9cbd43714FE2740f5E3616155c5b8419", 81 | "coingeckoId": "ethereum" 82 | } 83 | }, 84 | "WETH": { 85 | "symbol": "WETH", 86 | "address": "0xC02aaA39b223FE8D0A0e5C4F27eAD9083C756Cc2", 87 | "decimals": 18, 88 | "tickerHash": "0x0f8a193ff464434486c0daf7db2a895884365d2bc84ba47a68fcf89c1b14b5b8", 89 | "isNative": false, 90 | "price": { 91 | "isStable": false, 92 | "priceFeed": "0x5f4eC3Df9cbd43714FE2740f5E3616155c5b8419", 93 | "coingeckoId": "ethereum" 94 | } 95 | }, 96 | "USDC": { 97 | "symbol": "USDC", 98 | "address": "0xA0b86991c6218b36c1d19D4a2e9Eb0cE3606eB48", 99 | "decimals": 6, 100 | "tickerHash": "0xd6aca1be9729c13d677335161321649cccae6a591554772516700f986f942eaa", 101 | "isNative": false, 102 | "price": { 103 | "isStable": true, 104 | "priceFeed": "0x8fFfFfd4AfB6115b954Bd326cbe7B4BA576818f6", 105 | "coingeckoId": "usd-coin" 106 | } 107 | }, 108 | "USDT": { 109 | "symbol": "USDT", 110 | "address": "0xdAC17F958D2ee523a2206206994597C13D831ec7", 111 | "decimals": 6, 112 | "tickerHash": "0x8b1a1d9c2b109e527c9134b25b1a1833b16b6594f92daa9f6d9b7a6024bce9d0", 113 | "isNative": false, 114 | "price": { 115 | "isStable": true, 116 | "priceFeed": "0x3E7d1eAB13ad0104d2750B8863b489D65364e32D", 117 | "coingeckoId": "tether" 118 | } 119 | }, 120 | "xPufETH": { 121 | "symbol": "xPufETH", 122 | "address": "0xD7D2802f6b19843ac4DfE25022771FD83b5A7464", 123 | "decimals": 18, 124 | "tickerHash": "0x7ca978c7f993c411238b0887969711b470a3133448ab70e4f18aa4d63dcb7907", 125 | "isNative": false, 126 | "price": { 127 | "isStable": false, 128 | "coingeckoId": "pufeth" 129 | } 130 | }, 131 | "cbBTC": { 132 | "symbol": "cbBTC", 133 | "address": "0xcbB7C0000aB88B473b1f5aFd9ef808440eed33Bf", 134 | "decimals": 8, 135 | "tickerHash": "0xab7216efe876c5163ebb1d05a1a6b63e00fb73d1d68ddf079460c106356fd162", 136 | "isNative": false, 137 | "price": { 138 | "isStable": false, 139 | "coingeckoId": "coinbase-wrapped-bitcoin" 140 | } 141 | }, 142 | "WBTC": { 143 | "symbol": "WBTC", 144 | "address": "0x2260FAC5E5542a773Aa44fBCfeDf7C193bc2C599", 145 | "decimals": 8, 146 | "tickerHash": "0x98da2c5e4c6b1db946694570273b859a6e4083ccc8faa155edfc4c54eb3cfd73", 147 | "isNative": false, 148 | "price": { 149 | "isStable": false, 150 | "priceFeed": "0xF4030086522a5bEEa4988F8cA5B36dbC97BeE88c", 151 | "coingeckoId": "bitcoin" 152 | } 153 | }, 154 | "CLEAR": { 155 | "symbol": "CLEAR", 156 | "address": "0x58b9cB810A68a7f3e1E4f8Cb45D1B9B3c79705E8", 157 | "decimals": 18, 158 | "tickerHash": "0x06ac253a00ee13562eecafc06057c6db73566a05bdce988194aad3616e28e87c", 159 | "isNative": false, 160 | "price": { 161 | "isStable": false, 162 | "coingeckoId": "connext" 163 | } 164 | } 165 | } 166 | }, 167 | "10": { 168 | "network": "evm", 169 | "providers": [ 170 | "https://mainnet.optimism.io" 171 | ], 172 | "subgraphUrls": [ 173 | "https://api.goldsky.com/api/public/project_clssc64y57n5r010yeoly05up/subgraphs/everclear-spoke-optimism/production-v0.0.5/gn" 174 | ], 175 | "deployments": { 176 | "everclear": "0xa05A3380889115bf313f1Db9d5f335157Be4D816", 177 | "gateway": "0x9ADA72CCbAfe94248aFaDE6B604D1bEAacc899A7", 178 | "XERC20Module": "0xD1daF260951B8d350a4AeD5C80d74Fd7298C93F4" 179 | }, 180 | "confirmations": 1, 181 | "assets": { 182 | "ETH": { 183 | "symbol": "ETH", 184 | "address": "0x0000000000000000000000000000000000000000", 185 | "decimals": 18, 186 | "tickerHash": "0xaaaebeba3810b1e6b70781f14b2d72c1cb89c0b2b320c43bb67ff79f562f5ff4", 187 | "isNative": true, 188 | "price": { 189 | "isStable": false, 190 | "priceFeed": "0x13e3Ee699D1909E989722E753853AE30b17e08c5", 191 | "coingeckoId": "ethereum" 192 | } 193 | }, 194 | "WETH": { 195 | "symbol": "WETH", 196 | "address": "0x4200000000000000000000000000000000000006", 197 | "decimals": 18, 198 | "tickerHash": "0x0f8a193ff464434486c0daf7db2a895884365d2bc84ba47a68fcf89c1b14b5b8", 199 | "isNative": false, 200 | "price": { 201 | "isStable": false, 202 | "priceFeed": "0x13e3Ee699D1909E989722E753853AE30b17e08c5", 203 | "coingeckoId": "ethereum" 204 | } 205 | }, 206 | "USDC": { 207 | "symbol": "USDC", 208 | "address": "0x0b2C639c533813f4Aa9D7837CAf62653d097Ff85", 209 | "decimals": 6, 210 | "tickerHash": "0xd6aca1be9729c13d677335161321649cccae6a591554772516700f986f942eaa", 211 | "isNative": false, 212 | "price": { 213 | "isStable": true, 214 | "priceFeed": "0x16a9FA2FDa030272Ce99B29CF780dFA30361E0f3", 215 | "coingeckoId": "usd-coin" 216 | } 217 | }, 218 | "USDT": { 219 | "symbol": "USDT", 220 | "address": "0x94b008aA00579c1307B0EF2c499aD98a8ce58e58", 221 | "decimals": 6, 222 | "tickerHash": "0x8b1a1d9c2b109e527c9134b25b1a1833b16b6594f92daa9f6d9b7a6024bce9d0", 223 | "isNative": false, 224 | "price": { 225 | "isStable": true, 226 | "priceFeed": "0xECef79E109e997bCA29c1c0897ec9d7b03647F5E", 227 | "coingeckoId": "tether" 228 | } 229 | }, 230 | "CLEAR": { 231 | "symbol": "CLEAR", 232 | "address": "0x58b9cB810A68a7f3e1E4f8Cb45D1B9B3c79705E8", 233 | "decimals": 18, 234 | "tickerHash": "0x06ac253a00ee13562eecafc06057c6db73566a05bdce988194aad3616e28e87c", 235 | "isNative": false, 236 | "price": { 237 | "isStable": false, 238 | "coingeckoId": "connext" 239 | } 240 | } 241 | } 242 | }, 243 | "56": { 244 | "network": "evm", 245 | "providers": [ 246 | "https://bsc-mainnet.public.blastapi.io" 247 | ], 248 | "subgraphUrls": [ 249 | "https://api.goldsky.com/api/public/project_clssc64y57n5r010yeoly05up/subgraphs/everclear-spoke-bnb/production-v0.0.5/gn" 250 | ], 251 | "deployments": { 252 | "everclear": "0xa05A3380889115bf313f1Db9d5f335157Be4D816", 253 | "gateway": "0x9ADA72CCbAfe94248aFaDE6B604D1bEAacc899A7", 254 | "XERC20Module": "0xD1daF260951B8d350a4AeD5C80d74Fd7298C93F4" 255 | }, 256 | "gasLimit": 120000000, 257 | "confirmations": 20, 258 | "assets": { 259 | "BNB": { 260 | "symbol": "BNB", 261 | "address": "0x0000000000000000000000000000000000000000", 262 | "decimals": 18, 263 | "tickerHash": "0x3ed03c38e59dc60c7b69c2a4bf68f9214acd953252b5a90e8f5f59583e9bc3ae", 264 | "isNative": true, 265 | "price": { 266 | "isStable": false, 267 | "coingeckoId": "binancecoin" 268 | } 269 | }, 270 | "WETH": { 271 | "symbol": "WETH", 272 | "address": "0x2170Ed0880ac9A755fd29B2688956BD959F933F8", 273 | "decimals": 18, 274 | "tickerHash": "0x0f8a193ff464434486c0daf7db2a895884365d2bc84ba47a68fcf89c1b14b5b8", 275 | "isNative": false, 276 | "price": { 277 | "isStable": false, 278 | "coingeckoId": "ethereum", 279 | "mainnetEquivalent": "0x0000000000000000000000000000000000000000" 280 | } 281 | }, 282 | "USDC": { 283 | "symbol": "USDC", 284 | "address": "0x8AC76a51cc950d9822D68b83fE1Ad97B32Cd580d", 285 | "decimals": 18, 286 | "tickerHash": "0xd6aca1be9729c13d677335161321649cccae6a591554772516700f986f942eaa", 287 | "isNative": false, 288 | "price": { 289 | "isStable": true, 290 | "coingeckoId": "usd-coin", 291 | "mainnetEquivalent": "0xA0b86991c6218b36c1d19D4a2e9Eb0cE3606eB48" 292 | } 293 | }, 294 | "USDT": { 295 | "symbol": "USDT", 296 | "address": "0x55d398326f99059fF775485246999027B3197955", 297 | "decimals": 18, 298 | "tickerHash": "0x8b1a1d9c2b109e527c9134b25b1a1833b16b6594f92daa9f6d9b7a6024bce9d0", 299 | "isNative": false, 300 | "price": { 301 | "isStable": true, 302 | "coingeckoId": "tether", 303 | "mainnetEquivalent": "0xdAC17F958D2ee523a2206206994597C13D831ec7" 304 | } 305 | }, 306 | "xPufETH": { 307 | "symbol": "xPufETH", 308 | "address": "0x64274835D88F5c0215da8AADd9A5f2D2A2569381", 309 | "decimals": 18, 310 | "tickerHash": "0x7ca978c7f993c411238b0887969711b470a3133448ab70e4f18aa4d63dcb7907", 311 | "isNative": false, 312 | "price": { 313 | "isStable": false, 314 | "coingeckoId": "pufeth" 315 | } 316 | }, 317 | "CLEAR": { 318 | "symbol": "CLEAR", 319 | "address": "0x58b9cB810A68a7f3e1E4f8Cb45D1B9B3c79705E8", 320 | "decimals": 18, 321 | "tickerHash": "0x06ac253a00ee13562eecafc06057c6db73566a05bdce988194aad3616e28e87c", 322 | "isNative": false, 323 | "price": { 324 | "isStable": false, 325 | "coingeckoId": "connext" 326 | } 327 | } 328 | } 329 | }, 330 | "8453": { 331 | "network": "evm", 332 | "providers": [ 333 | "https://base-mainnet.public.blastapi.io" 334 | ], 335 | "subgraphUrls": [ 336 | "https://api.goldsky.com/api/public/project_clssc64y57n5r010yeoly05up/subgraphs/everclear-spoke-base/production-v0.0.5/gn" 337 | ], 338 | "deployments": { 339 | "everclear": "0xa05A3380889115bf313f1Db9d5f335157Be4D816", 340 | "gateway": "0x9ADA72CCbAfe94248aFaDE6B604D1bEAacc899A7", 341 | "XERC20Module": "0xD1daF260951B8d350a4AeD5C80d74Fd7298C93F4" 342 | }, 343 | "confirmations": 1, 344 | "assets": { 345 | "ETH": { 346 | "symbol": "ETH", 347 | "address": "0x0000000000000000000000000000000000000000", 348 | "decimals": 18, 349 | "tickerHash": "0xaaaebeba3810b1e6b70781f14b2d72c1cb89c0b2b320c43bb67ff79f562f5ff4", 350 | "isNative": true, 351 | "price": { 352 | "isStable": false, 353 | "priceFeed": "0x71041dddad3595F9CEd3DcCFBe3D1F4b0a16Bb70", 354 | "coingeckoId": "ethereum" 355 | } 356 | }, 357 | "WETH": { 358 | "symbol": "WETH", 359 | "address": "0x4200000000000000000000000000000000000006", 360 | "decimals": 18, 361 | "tickerHash": "0x0f8a193ff464434486c0daf7db2a895884365d2bc84ba47a68fcf89c1b14b5b8", 362 | "isNative": false, 363 | "price": { 364 | "isStable": false, 365 | "priceFeed": "0x71041dddad3595F9CEd3DcCFBe3D1F4b0a16Bb70", 366 | "coingeckoId": "ethereum" 367 | } 368 | }, 369 | "USDC": { 370 | "symbol": "USDC", 371 | "address": "0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913", 372 | "decimals": 6, 373 | "tickerHash": "0xd6aca1be9729c13d677335161321649cccae6a591554772516700f986f942eaa", 374 | "isNative": false, 375 | "price": { 376 | "isStable": true, 377 | "priceFeed": "0x7e860098F58bBFC8648a4311b374B1D669a2bc6B", 378 | "coingeckoId": "usd-coin" 379 | } 380 | }, 381 | "USDT": { 382 | "symbol": "USDT", 383 | "address": "0xfde4C96c8593536E31F229EA8f37b2ADa2699bb2", 384 | "decimals": 6, 385 | "tickerHash": "0x8b1a1d9c2b109e527c9134b25b1a1833b16b6594f92daa9f6d9b7a6024bce9d0", 386 | "isNative": false, 387 | "price": { 388 | "isStable": true, 389 | "priceFeed": "0x3f3f5dF88dC9F13eac63DF89EC16ef6e7E25DdE7", 390 | "coingeckoId": "tether" 391 | } 392 | }, 393 | "xPufETH": { 394 | "symbol": "xPufETH", 395 | "address": "0x23dA5F2d509cb43A59d43C108a43eDf34510eff1", 396 | "decimals": 18, 397 | "tickerHash": "0x7ca978c7f993c411238b0887969711b470a3133448ab70e4f18aa4d63dcb7907", 398 | "isNative": false, 399 | "price": { 400 | "isStable": false, 401 | "coingeckoId": "pufeth" 402 | } 403 | }, 404 | "cbBTC": { 405 | "symbol": "cbBTC", 406 | "address": "0xcbB7C0000aB88B473b1f5aFd9ef808440eed33Bf", 407 | "decimals": 8, 408 | "tickerHash": "0xab7216efe876c5163ebb1d05a1a6b63e00fb73d1d68ddf079460c106356fd162", 409 | "isNative": false, 410 | "price": { 411 | "isStable": false, 412 | "coingeckoId": "coinbase-wrapped-bitcoin" 413 | } 414 | }, 415 | "WBTC": { 416 | "symbol": "WBTC", 417 | "address": "0x0555E30da8f98308EdB960aa94C0Db47230d2B9c", 418 | "decimals": 8, 419 | "tickerHash": "0x98da2c5e4c6b1db946694570273b859a6e4083ccc8faa155edfc4c54eb3cfd73", 420 | "isNative": false, 421 | "price": { 422 | "isStable": false, 423 | "priceFeed": "0xCCAA289f71Bf3C5266841070EF24985857e9cD83", 424 | "coingeckoId": "bitcoin" 425 | } 426 | } 427 | } 428 | }, 429 | "42161": { 430 | "network": "evm", 431 | "providers": [ 432 | "https://arbitrum-one.public.blastapi.io" 433 | ], 434 | "subgraphUrls": [ 435 | "https://api.goldsky.com/api/public/project_clssc64y57n5r010yeoly05up/subgraphs/everclear-spoke-arbitrum/production-v0.0.5/gn" 436 | ], 437 | "deployments": { 438 | "everclear": "0xa05A3380889115bf313f1Db9d5f335157Be4D816", 439 | "gateway": "0x9ADA72CCbAfe94248aFaDE6B604D1bEAacc899A7", 440 | "XERC20Module": "0xD1daF260951B8d350a4AeD5C80d74Fd7298C93F4" 441 | }, 442 | "confirmations": 1, 443 | "assets": { 444 | "ETH": { 445 | "symbol": "ETH", 446 | "address": "0x0000000000000000000000000000000000000000", 447 | "decimals": 18, 448 | "tickerHash": "0xaaaebeba3810b1e6b70781f14b2d72c1cb89c0b2b320c43bb67ff79f562f5ff4", 449 | "isNative": true, 450 | "price": { 451 | "isStable": false, 452 | "priceFeed": "0x639Fe6ab55C921f74e7fac1ee960C0B6293ba612", 453 | "coingeckoId": "ethereum" 454 | } 455 | }, 456 | "WETH": { 457 | "symbol": "WETH", 458 | "address": "0x82aF49447D8a07e3bd95BD0d56f35241523fBab1", 459 | "decimals": 18, 460 | "tickerHash": "0x0f8a193ff464434486c0daf7db2a895884365d2bc84ba47a68fcf89c1b14b5b8", 461 | "isNative": false, 462 | "price": { 463 | "isStable": false, 464 | "priceFeed": "0x639Fe6ab55C921f74e7fac1ee960C0B6293ba612", 465 | "coingeckoId": "ethereum" 466 | } 467 | }, 468 | "USDC": { 469 | "symbol": "USDC", 470 | "address": "0xaf88d065e77c8cC2239327C5EDb3A432268e5831", 471 | "decimals": 6, 472 | "tickerHash": "0xd6aca1be9729c13d677335161321649cccae6a591554772516700f986f942eaa", 473 | "isNative": false, 474 | "price": { 475 | "isStable": true, 476 | "priceFeed": "0x50834F3163758fcC1Df9973b6e91f0F0F0434aD3", 477 | "coingeckoId": "usd-coin" 478 | } 479 | }, 480 | "USDT": { 481 | "symbol": "USDT", 482 | "address": "0xFd086bC7CD5C481DCC9C85ebE478A1C0b69FCbb9", 483 | "decimals": 6, 484 | "tickerHash": "0x8b1a1d9c2b109e527c9134b25b1a1833b16b6594f92daa9f6d9b7a6024bce9d0", 485 | "isNative": false, 486 | "price": { 487 | "isStable": true, 488 | "priceFeed": "0x3f3f5dF88dC9F13eac63DF89EC16ef6e7E25DdE7", 489 | "coingeckoId": "tether" 490 | } 491 | }, 492 | "CLEAR": { 493 | "symbol": "CLEAR", 494 | "address": "0x58b9cB810A68a7f3e1E4f8Cb45D1B9B3c79705E8", 495 | "decimals": 18, 496 | "tickerHash": "0x06ac253a00ee13562eecafc06057c6db73566a05bdce988194aad3616e28e87c", 497 | "isNative": false, 498 | "price": { 499 | "isStable": false, 500 | "coingeckoId": "connext" 501 | } 502 | } 503 | } 504 | }, 505 | "48900": { 506 | "network": "evm", 507 | "providers": [ 508 | "https://zircuit1-mainnet.liquify.com", 509 | "https://zircuit-mainnet.drpc.org" 510 | ], 511 | "subgraphUrls": [ 512 | "https://api.goldsky.com/api/public/project_clssc64y57n5r010yeoly05up/subgraphs/everclear-spoke-zircuit/production-v0.0.3/gn" 513 | ], 514 | "deployments": { 515 | "everclear": "0xD0E86F280D26Be67A672d1bFC9bB70500adA76fe", 516 | "gateway": "0x2Ec2b2CC1813941b638D3ADBA86A1af7F6488A9E", 517 | "XERC20Module": "0xE4197BC6b18E2BE0BAF09c13DA8239B40005D541" 518 | }, 519 | "confirmations": 1, 520 | "assets": { 521 | "WETH": { 522 | "symbol": "WETH", 523 | "address": "0x4200000000000000000000000000000000000006", 524 | "decimals": 18, 525 | "tickerHash": "0x0f8a193ff464434486c0daf7db2a895884365d2bc84ba47a68fcf89c1b14b5b8", 526 | "isNative": false, 527 | "price": { 528 | "isStable": false, 529 | "coingeckoId": "ethereum" 530 | } 531 | }, 532 | "USDC": { 533 | "symbol": "USDC", 534 | "address": "0x3b952c8C9C44e8Fe201e2b26F6B2200203214cfF", 535 | "decimals": 6, 536 | "tickerHash": "0xd6aca1be9729c13d677335161321649cccae6a591554772516700f986f942eaa", 537 | "isNative": false, 538 | "price": { 539 | "isStable": true, 540 | "coingeckoId": "usd-coin" 541 | } 542 | }, 543 | "USDT": { 544 | "symbol": "USDT", 545 | "address": "0x46dDa6a5a559d861c06EC9a95Fb395f5C3Db0742", 546 | "decimals": 6, 547 | "tickerHash": "0x8b1a1d9c2b109e527c9134b25b1a1833b16b6594f92daa9f6d9b7a6024bce9d0", 548 | "isNative": false, 549 | "price": { 550 | "isStable": true, 551 | "coingeckoId": "tether" 552 | } 553 | }, 554 | "xPufETH": { 555 | "symbol": "xPufETH", 556 | "address": "0x9346A5043C590133FE900aec643D9622EDddBA57", 557 | "decimals": 18, 558 | "tickerHash": "0x7ca978c7f993c411238b0887969711b470a3133448ab70e4f18aa4d63dcb7907", 559 | "isNative": false, 560 | "price": { 561 | "isStable": false, 562 | "coingeckoId": "pufeth" 563 | } 564 | } 565 | } 566 | }, 567 | "59144": { 568 | "network": "evm", 569 | "providers": [ 570 | "https://linea.drpc.org" 571 | ], 572 | "subgraphUrls": [ 573 | "https://api.goldsky.com/api/public/project_clssc64y57n5r010yeoly05up/subgraphs/everclear-spoke-linea/production-v0.0.3/gn" 574 | ], 575 | "deployments": { 576 | "everclear": "0xc24dC29774fD2c1c0c5FA31325Bb9cbC11D8b751", 577 | "gateway": "0xC1E5b7bE6c62948eeAb40523B33e5d0121ccae94", 578 | "XERC20Module": "0xBBd3546f8FB1A335E2Cc1AeE5d7f3FC696D853aB" 579 | }, 580 | "confirmations": 1, 581 | "assets": { 582 | "ETH": { 583 | "symbol": "ETH", 584 | "address": "0x0000000000000000000000000000000000000000", 585 | "decimals": 18, 586 | "tickerHash": "0xaaaebeba3810b1e6b70781f14b2d72c1cb89c0b2b320c43bb67ff79f562f5ff4", 587 | "isNative": true, 588 | "price": { 589 | "isStable": false, 590 | "priceFeed": "", 591 | "coingeckoId": "ethereum" 592 | } 593 | }, 594 | "WETH": { 595 | "symbol": "WETH", 596 | "address": "0xe5d7c2a44ffddf6b295a15c148167daaaf5cf34f", 597 | "decimals": 18, 598 | "tickerHash": "0x0f8a193ff464434486c0daf7db2a895884365d2bc84ba47a68fcf89c1b14b5b8", 599 | "isNative": false, 600 | "price": { 601 | "isStable": false, 602 | "priceFeed": "", 603 | "coingeckoId": "ethereum" 604 | } 605 | }, 606 | "USDC": { 607 | "symbol": "USDC", 608 | "address": "0x176211869cA2b568f2A7D4EE941E073a821EE1ff", 609 | "decimals": 6, 610 | "tickerHash": "0xd6aca1be9729c13d677335161321649cccae6a591554772516700f986f942eaa", 611 | "isNative": false, 612 | "price": { 613 | "isStable": true, 614 | "priceFeed": "", 615 | "coingeckoId": "usd-coin" 616 | } 617 | }, 618 | "USDT": { 619 | "symbol": "USDT", 620 | "address": "0xa219439258ca9da29e9cc4ce5596924745e12b93", 621 | "decimals": 6, 622 | "tickerHash": "0x8b1a1d9c2b109e527c9134b25b1a1833b16b6594f92daa9f6d9b7a6024bce9d0", 623 | "isNative": false, 624 | "price": { 625 | "isStable": true, 626 | "priceFeed": "", 627 | "coingeckoId": "tether" 628 | } 629 | }, 630 | "WBTC": { 631 | "symbol": "WBTC", 632 | "address": "0x3aab2285ddcddad8edf438c1bab47e1a9d05a9b4", 633 | "decimals": 6, 634 | "tickerHash": "0x98da2c5e4c6b1db946694570273b859a6e4083ccc8faa155edfc4c54eb3cfd73", 635 | "isNative": false, 636 | "price": { 637 | "isStable": false, 638 | "priceFeed": "", 639 | "coingeckoId": "bitcoin" 640 | } 641 | } 642 | } 643 | }, 644 | "137": { 645 | "network": "evm", 646 | "providers": [ 647 | "https://polygon.drpc.org" 648 | ], 649 | "subgraphUrls": [ 650 | "https://api.goldsky.com/api/public/project_clssc64y57n5r010yeoly05up/subgraphs/everclear-spoke-polygon/production-v0.0.3/gn" 651 | ], 652 | "deployments": { 653 | "everclear": "0x7189C59e245135696bFd2906b56607755F84F3fD", 654 | "gateway": "0x26CFF54f11608Cd3060408690803AB4a43f462f2", 655 | "XERC20Module": "0x4aade9F812d2160A1b3c6e77f30f1bF14eC7e2a5" 656 | }, 657 | "confirmations": 1, 658 | "assets": { 659 | "POL": { 660 | "symbol": "POL", 661 | "address": "0x0000000000000000000000000000000000000000", 662 | "decimals": 18, 663 | "tickerHash": "0x5611acaae5e6f2d151766dae4f93d18a904ae6f9265184ffea692c2e6e52b7fe", 664 | "isNative": true, 665 | "price": { 666 | "isStable": false, 667 | "coingeckoId": "polygon-ecosystem-token" 668 | } 669 | }, 670 | "WETH": { 671 | "symbol": "WETH", 672 | "address": "0x7ceB23fD6bC0adD59E62ac25578270cFf1b9f619", 673 | "decimals": 18, 674 | "tickerHash": "0x0f8a193ff464434486c0daf7db2a895884365d2bc84ba47a68fcf89c1b14b5b8", 675 | "isNative": false, 676 | "price": { 677 | "isStable": false, 678 | "priceFeed": "", 679 | "coingeckoId": "ethereum" 680 | } 681 | }, 682 | "USDC": { 683 | "symbol": "USDC", 684 | "address": "0x3c499c542cEF5E3811e1192ce70d8cC03d5c3359", 685 | "decimals": 6, 686 | "tickerHash": "0xd6aca1be9729c13d677335161321649cccae6a591554772516700f986f942eaa", 687 | "isNative": false, 688 | "price": { 689 | "isStable": true, 690 | "priceFeed": "", 691 | "coingeckoId": "usd-coin" 692 | } 693 | }, 694 | "USDT": { 695 | "symbol": "USDT", 696 | "address": "0xc2132d05d31c914a87c6611c10748aeb04b58e8f", 697 | "decimals": 6, 698 | "tickerHash": "0x8b1a1d9c2b109e527c9134b25b1a1833b16b6594f92daa9f6d9b7a6024bce9d0", 699 | "isNative": false, 700 | "price": { 701 | "isStable": true, 702 | "priceFeed": "", 703 | "coingeckoId": "tether" 704 | } 705 | }, 706 | "WBTC": { 707 | "symbol": "WBTC", 708 | "address": "0x1bfd67037b42cf73acf2047067bd4f2c47d9bfd6", 709 | "decimals": 6, 710 | "tickerHash": "0x98da2c5e4c6b1db946694570273b859a6e4083ccc8faa155edfc4c54eb3cfd73", 711 | "isNative": false, 712 | "price": { 713 | "isStable": false, 714 | "priceFeed": "", 715 | "coingeckoId": "bitcoin" 716 | } 717 | }, 718 | "CLEAR": { 719 | "symbol": "CLEAR", 720 | "address": "0x58b9cB810A68a7f3e1E4f8Cb45D1B9B3c79705E8", 721 | "decimals": 18, 722 | "tickerHash": "0x06ac253a00ee13562eecafc06057c6db73566a05bdce988194aad3616e28e87c", 723 | "isNative": false, 724 | "price": { 725 | "isStable": false, 726 | "coingeckoId": "connext" 727 | } 728 | } 729 | } 730 | }, 731 | "43114": { 732 | "network": "evm", 733 | "providers": [ 734 | "https://avalanche.drpc.org" 735 | ], 736 | "subgraphUrls": [ 737 | "https://api.goldsky.com/api/public/project_clssc64y57n5r010yeoly05up/subgraphs/everclear-spoke-avalanche/production-v0.0.3/gn" 738 | ], 739 | "deployments": { 740 | "everclear": "0x9aA2Ecad5C77dfcB4f34893993f313ec4a370460", 741 | "gateway": "0x7EB63a646721de65eBa79ffe91c55DCE52b73c12", 742 | "XERC20Module": "0x255aba6E7f08d40B19872D11313688c2ED65d1C9" 743 | }, 744 | "confirmations": 1, 745 | "assets": { 746 | "AVAX": { 747 | "symbol": "AVAX", 748 | "address": "0x0000000000000000000000000000000000000000", 749 | "decimals": 18, 750 | "tickerHash": "0x49f18ed70c3220abb735efdc7fce309e384d008d4bc14c846dcce9e31050e29b", 751 | "isNative": true, 752 | "price": { 753 | "isStable": false, 754 | "coingeckoId": "avalanche-2" 755 | } 756 | }, 757 | "WETH": { 758 | "symbol": "WETH", 759 | "address": "0x49d5c2bdffac6ce2bfdb6640f4f80f226bc10bab", 760 | "decimals": 18, 761 | "tickerHash": "0x0f8a193ff464434486c0daf7db2a895884365d2bc84ba47a68fcf89c1b14b5b8", 762 | "isNative": false, 763 | "price": { 764 | "isStable": false, 765 | "priceFeed": "", 766 | "coingeckoId": "ethereum" 767 | } 768 | }, 769 | "USDC": { 770 | "symbol": "USDC", 771 | "address": "0xB97EF9Ef8734C71904D8002F8b6Bc66Dd9c48a6E", 772 | "decimals": 6, 773 | "tickerHash": "0xd6aca1be9729c13d677335161321649cccae6a591554772516700f986f942eaa", 774 | "isNative": false, 775 | "price": { 776 | "isStable": true, 777 | "priceFeed": "", 778 | "coingeckoId": "usd-coin" 779 | } 780 | }, 781 | "USDT": { 782 | "symbol": "USDT", 783 | "address": "0x9702230A8Ea53601f5cD2dc00fDBc13d4dF4A8c7", 784 | "decimals": 6, 785 | "tickerHash": "0x8b1a1d9c2b109e527c9134b25b1a1833b16b6594f92daa9f6d9b7a6024bce9d0", 786 | "isNative": false, 787 | "price": { 788 | "isStable": true, 789 | "priceFeed": "", 790 | "coingeckoId": "tether" 791 | } 792 | }, 793 | "WBTC": { 794 | "symbol": "WBTC", 795 | "address": "0x50b7545627a5162f82a992c33b87adc75187b218", 796 | "decimals": 6, 797 | "tickerHash": "0x98da2c5e4c6b1db946694570273b859a6e4083ccc8faa155edfc4c54eb3cfd73", 798 | "isNative": false, 799 | "price": { 800 | "isStable": false, 801 | "priceFeed": "", 802 | "coingeckoId": "bitcoin" 803 | } 804 | } 805 | } 806 | }, 807 | "81457": { 808 | "network": "evm", 809 | "providers": [ 810 | "https://blastl2-mainnet.public.blastapi.io" 811 | ], 812 | "subgraphUrls": [ 813 | "https://api.goldsky.com/api/public/project_clssc64y57n5r010yeoly05up/subgraphs/everclear-spoke-blast/production-v0.0.3/gn" 814 | ], 815 | "deployments": { 816 | "everclear": "0x9ADA72CCbAfe94248aFaDE6B604D1bEAacc899A7", 817 | "gateway": "0x4e2bbbFb10058E0D248a78fe2F469562f4eDbe66", 818 | "XERC20Module": "0xdCA40903E271Cc76AECd62dF8d6c19f3Ac873E64" 819 | }, 820 | "confirmations": 1, 821 | "assets": { 822 | "ETH": { 823 | "symbol": "ETH", 824 | "address": "0x0000000000000000000000000000000000000000", 825 | "decimals": 18, 826 | "tickerHash": "0xaaaebeba3810b1e6b70781f14b2d72c1cb89c0b2b320c43bb67ff79f562f5ff4", 827 | "isNative": true, 828 | "price": { 829 | "isStable": false, 830 | "priceFeed": "0x13e3Ee699D1909E989722E753853AE30b17e08c5", 831 | "coingeckoId": "ethereum" 832 | } 833 | }, 834 | "WETH": { 835 | "symbol": "WETH", 836 | "address": "0x4300000000000000000000000000000000000004", 837 | "decimals": 18, 838 | "tickerHash": "0x0f8a193ff464434486c0daf7db2a895884365d2bc84ba47a68fcf89c1b14b5b8", 839 | "isNative": false, 840 | "price": { 841 | "isStable": false, 842 | "coingeckoId": "ethereum" 843 | } 844 | } 845 | } 846 | }, 847 | "534352": { 848 | "network": "evm", 849 | "providers": [ 850 | "https://scroll-mainnet.public.blastapi.io" 851 | ], 852 | "subgraphUrls": [ 853 | "https://api.goldsky.com/api/public/project_clssc64y57n5r010yeoly05up/subgraphs/everclear-spoke-scroll/production-v0.0.3/gn" 854 | ], 855 | "deployments": { 856 | "everclear": "0xa05A3380889115bf313f1Db9d5f335157Be4D816", 857 | "gateway": "0x9ADA72CCbAfe94248aFaDE6B604D1bEAacc899A7", 858 | "XERC20Module": "0xD1daF260951B8d350a4AeD5C80d74Fd7298C93F4" 859 | }, 860 | "confirmations": 1, 861 | "assets": { 862 | "ETH": { 863 | "symbol": "ETH", 864 | "address": "0x0000000000000000000000000000000000000000", 865 | "decimals": 18, 866 | "tickerHash": "0xaaaebeba3810b1e6b70781f14b2d72c1cb89c0b2b320c43bb67ff79f562f5ff4", 867 | "isNative": true, 868 | "price": { 869 | "isStable": false, 870 | "priceFeed": "", 871 | "coingeckoId": "ethereum" 872 | } 873 | }, 874 | "WETH": { 875 | "symbol": "WETH", 876 | "address": "0x5300000000000000000000000000000000000004", 877 | "decimals": 18, 878 | "tickerHash": "0x0f8a193ff464434486c0daf7db2a895884365d2bc84ba47a68fcf89c1b14b5b8", 879 | "isNative": false, 880 | "price": { 881 | "isStable": false, 882 | "coingeckoId": "ethereum" 883 | } 884 | }, 885 | "USDC": { 886 | "symbol": "USDC", 887 | "address": "0x06eFdBFf2a14a7c8E15944D1F4A48F9F95F663A4", 888 | "decimals": 6, 889 | "tickerHash": "0xd6aca1be9729c13d677335161321649cccae6a591554772516700f986f942eaa", 890 | "isNative": false, 891 | "price": { 892 | "isStable": true, 893 | "coingeckoId": "usd-coin" 894 | } 895 | }, 896 | "USDT": { 897 | "symbol": "USDT", 898 | "address": "0xf55BEC9cafDbE8730f096Aa55dad6D22d44099Df", 899 | "decimals": 6, 900 | "tickerHash": "0x8b1a1d9c2b109e527c9134b25b1a1833b16b6594f92daa9f6d9b7a6024bce9d0", 901 | "isNative": false, 902 | "price": { 903 | "isStable": true, 904 | "coingeckoId": "tether" 905 | } 906 | } 907 | } 908 | }, 909 | "167000": { 910 | "network": "evm", 911 | "providers": [ 912 | "https://taiko.drpc.org" 913 | ], 914 | "subgraphUrls": [ 915 | "https://api.goldsky.com/api/public/project_clssc64y57n5r010yeoly05up/subgraphs/everclear-spoke-taiko/production-v0.0.4/gn" 916 | ], 917 | "deployments": { 918 | "everclear": "0x9ADA72CCbAfe94248aFaDE6B604D1bEAacc899A7", 919 | "gateway": "0x4e2bbbFb10058E0D248a78fe2F469562f4eDbe66", 920 | "XERC20Module": "0xdCA40903E271Cc76AECd62dF8d6c19f3Ac873E64" 921 | }, 922 | "confirmations": 1, 923 | "assets": { 924 | "ETH": { 925 | "symbol": "ETH", 926 | "address": "0x0000000000000000000000000000000000000000", 927 | "decimals": 18, 928 | "tickerHash": "0xaaaebeba3810b1e6b70781f14b2d72c1cb89c0b2b320c43bb67ff79f562f5ff4", 929 | "isNative": true, 930 | "price": { 931 | "isStable": false, 932 | "priceFeed": "", 933 | "coingeckoId": "ethereum" 934 | } 935 | }, 936 | "WETH": { 937 | "symbol": "WETH", 938 | "address": "0xA51894664A773981C6C112C43ce576f315d5b1B6", 939 | "decimals": 18, 940 | "tickerHash": "0x0f8a193ff464434486c0daf7db2a895884365d2bc84ba47a68fcf89c1b14b5b8", 941 | "isNative": false, 942 | "price": { 943 | "isStable": false, 944 | "coingeckoId": "ethereum" 945 | } 946 | }, 947 | "USDC": { 948 | "symbol": "USDC", 949 | "address": "0x07d83526730c7438048D55A4fc0b850e2aaB6f0b", 950 | "decimals": 6, 951 | "tickerHash": "0xd6aca1be9729c13d677335161321649cccae6a591554772516700f986f942eaa", 952 | "isNative": false, 953 | "price": { 954 | "isStable": true, 955 | "coingeckoId": "usd-coin" 956 | } 957 | }, 958 | "USDT": { 959 | "symbol": "USDT", 960 | "address": "0x2DEF195713CF4a606B49D07E520e22C17899a736", 961 | "decimals": 6, 962 | "tickerHash": "0x8b1a1d9c2b109e527c9134b25b1a1833b16b6594f92daa9f6d9b7a6024bce9d0", 963 | "isNative": false, 964 | "price": { 965 | "isStable": true, 966 | "coingeckoId": "tether" 967 | } 968 | } 969 | } 970 | }, 971 | "33139": { 972 | "network": "evm", 973 | "providers": [ 974 | "https://apechain.drpc.org" 975 | ], 976 | "subgraphUrls": [ 977 | "https://api.goldsky.com/api/public/project_clssc64y57n5r010yeoly05up/subgraphs/everclear-spoke-apechain/production-v0.0.3/gn" 978 | ], 979 | "deployments": { 980 | "everclear": "0xa05A3380889115bf313f1Db9d5f335157Be4D816", 981 | "gateway": "0x9ADA72CCbAfe94248aFaDE6B604D1bEAacc899A7", 982 | "XERC20Module": "0xD1daF260951B8d350a4AeD5C80d74Fd7298C93F4" 983 | }, 984 | "confirmations": 1, 985 | "assets": { 986 | "APE": { 987 | "symbol": "APE", 988 | "address": "0x7f9FBf9bDd3F4105C478b996B648FE6e828a1e98", 989 | "decimals": 18, 990 | "tickerHash": "0x26bca2ecad19e981c90a8c6efd8ee9856bbc5a2042259e6ee31e310fdc08d970", 991 | "isNative": true, 992 | "price": { 993 | "isStable": false, 994 | "coingeckoId": "ape" 995 | } 996 | }, 997 | "APE-ETH": { 998 | "symbol": "APE-ETH", 999 | "address": "0xcF800F4948D16F23333508191B1B1591daF70438", 1000 | "decimals": 18, 1001 | "tickerHash": "0x3f015e6458886a456e1137ee9b9d69c67b3168ef84640aa5bdd95a964e7b84b7", 1002 | "isNative": false, 1003 | "price": { 1004 | "isStable": false, 1005 | "coingeckoId": "ethereum" 1006 | } 1007 | }, 1008 | "xPufETH": { 1009 | "symbol": "xPufETH", 1010 | "address": "0x6234E5ef39B12EFdFcbd99dd7F452F27F3fEAE3b", 1011 | "decimals": 18, 1012 | "tickerHash": "0x7ca978c7f993c411238b0887969711b470a3133448ab70e4f18aa4d63dcb7907", 1013 | "isNative": false, 1014 | "price": { 1015 | "isStable": false, 1016 | "coingeckoId": "pufeth" 1017 | } 1018 | } 1019 | } 1020 | }, 1021 | "34443": { 1022 | "network": "evm", 1023 | "providers": [ 1024 | "https://mode.drpc.org" 1025 | ], 1026 | "subgraphUrls": [ 1027 | "https://api.goldsky.com/api/public/project_clssc64y57n5r010yeoly05up/subgraphs/everclear-spoke-mode/production-v0.0.3/gn" 1028 | ], 1029 | "deployments": { 1030 | "everclear": "0xeFa6Ac3F931620fD0449eC8c619f2A14A0A78E99", 1031 | "gateway": "0xD1daF260951B8d350a4AeD5C80d74Fd7298C93F4", 1032 | "XERC20Module": "0x7B435CCF350DBC773e077410e8FEFcd46A1cDfAA" 1033 | }, 1034 | "confirmations": 1, 1035 | "assets": { 1036 | "ETH": { 1037 | "symbol": "ETH", 1038 | "address": "0x0000000000000000000000000000000000000000", 1039 | "decimals": 18, 1040 | "tickerHash": "0xaaaebeba3810b1e6b70781f14b2d72c1cb89c0b2b320c43bb67ff79f562f5ff4", 1041 | "isNative": true, 1042 | "price": { 1043 | "isStable": false, 1044 | "coingeckoId": "ethereum" 1045 | } 1046 | }, 1047 | "WETH": { 1048 | "symbol": "WETH", 1049 | "address": "0x4200000000000000000000000000000000000006", 1050 | "decimals": 18, 1051 | "tickerHash": "0x0f8a193ff464434486c0daf7db2a895884365d2bc84ba47a68fcf89c1b14b5b8", 1052 | "isNative": false, 1053 | "price": { 1054 | "isStable": false, 1055 | "coingeckoId": "ethereum" 1056 | } 1057 | }, 1058 | "USDC": { 1059 | "symbol": "USDC", 1060 | "address": "0xd988097fb8612cc24eeC14542bC03424c656005f", 1061 | "decimals": 6, 1062 | "tickerHash": "0xd6aca1be9729c13d677335161321649cccae6a591554772516700f986f942eaa", 1063 | "isNative": false, 1064 | "price": { 1065 | "isStable": true, 1066 | "coingeckoId": "usd-coin" 1067 | } 1068 | }, 1069 | "USDT": { 1070 | "symbol": "USDT", 1071 | "address": "0xf0F161fDA2712DB8b566946122a5af183995e2eD", 1072 | "decimals": 6, 1073 | "tickerHash": "0x8b1a1d9c2b109e527c9134b25b1a1833b16b6594f92daa9f6d9b7a6024bce9d0", 1074 | "isNative": false, 1075 | "price": { 1076 | "isStable": true, 1077 | "coingeckoId": "tether" 1078 | } 1079 | } 1080 | } 1081 | }, 1082 | "130": { 1083 | "network": "evm", 1084 | "providers": [ 1085 | "https://mainnet.unichain.org" 1086 | ], 1087 | "subgraphUrls": [ 1088 | "https://api.goldsky.com/api/public/project_clssc64y57n5r010yeoly05up/subgraphs/everclear-spoke-unichain/production-v0.0.3/gn" 1089 | ], 1090 | "deployments": { 1091 | "everclear": "0xa05A3380889115bf313f1Db9d5f335157Be4D816", 1092 | "gateway": "0x9ADA72CCbAfe94248aFaDE6B604D1bEAacc899A7", 1093 | "XERC20Module": "0xD1daF260951B8d350a4AeD5C80d74Fd7298C93F4" 1094 | }, 1095 | "confirmations": 1, 1096 | "assets": { 1097 | "ETH": { 1098 | "symbol": "ETH", 1099 | "address": "0x0000000000000000000000000000000000000000", 1100 | "decimals": 18, 1101 | "tickerHash": "0xaaaebeba3810b1e6b70781f14b2d72c1cb89c0b2b320c43bb67ff79f562f5ff4", 1102 | "isNative": true, 1103 | "price": { 1104 | "isStable": false, 1105 | "coingeckoId": "ethereum" 1106 | } 1107 | }, 1108 | "WETH": { 1109 | "symbol": "WETH", 1110 | "address": "0x4200000000000000000000000000000000000006", 1111 | "decimals": 18, 1112 | "tickerHash": "0x0f8a193ff464434486c0daf7db2a895884365d2bc84ba47a68fcf89c1b14b5b8", 1113 | "isNative": false, 1114 | "price": { 1115 | "isStable": false, 1116 | "coingeckoId": "ethereum" 1117 | } 1118 | }, 1119 | "USDC": { 1120 | "symbol": "USDC", 1121 | "address": "0x078D782b760474a361dDA0AF3839290b0EF57AD6", 1122 | "decimals": 6, 1123 | "tickerHash": "0xd6aca1be9729c13d677335161321649cccae6a591554772516700f986f942eaa", 1124 | "isNative": false, 1125 | "price": { 1126 | "isStable": true, 1127 | "coingeckoId": "usd-coin" 1128 | } 1129 | }, 1130 | "USDT": { 1131 | "symbol": "USDT", 1132 | "address": "0x588CE4F028D8e7B53B687865d6A67b3A54C75518", 1133 | "decimals": 6, 1134 | "tickerHash": "0x8b1a1d9c2b109e527c9134b25b1a1833b16b6594f92daa9f6d9b7a6024bce9d0", 1135 | "isNative": false, 1136 | "price": { 1137 | "isStable": true, 1138 | "coingeckoId": "tether" 1139 | } 1140 | } 1141 | } 1142 | }, 1143 | "324": { 1144 | "network": "evm", 1145 | "providers": [ 1146 | "https://mainnet.era.zksync.io" 1147 | ], 1148 | "subgraphUrls": [ 1149 | "https://api.goldsky.com/api/public/project_clssc64y57n5r010yeoly05up/subgraphs/everclear-spoke-zksync/production-v0.0.3/gn" 1150 | ], 1151 | "deployments": { 1152 | "everclear": "0x7F5e085981C93C579c865554B9b723B058AaE4D3", 1153 | "gateway": "0xbD82E5503461913a70566E66a454465a46F5C903", 1154 | "XERC20Module": "0x6ACf19603C8588885250F7a02F0EaFFa4FcafB04" 1155 | }, 1156 | "confirmations": 1, 1157 | "assets": { 1158 | "ETH": { 1159 | "symbol": "ETH", 1160 | "address": "0x0000000000000000000000000000000000000000", 1161 | "decimals": 18, 1162 | "tickerHash": "0xaaaebeba3810b1e6b70781f14b2d72c1cb89c0b2b320c43bb67ff79f562f5ff4", 1163 | "isNative": true, 1164 | "price": { 1165 | "isStable": false, 1166 | "coingeckoId": "ethereum" 1167 | } 1168 | }, 1169 | "WETH": { 1170 | "symbol": "WETH", 1171 | "address": "0x5AEa5775959fBC2557Cc8789bC1bf90A239D9a91", 1172 | "decimals": 18, 1173 | "tickerHash": "0x0f8a193ff464434486c0daf7db2a895884365d2bc84ba47a68fcf89c1b14b5b8", 1174 | "isNative": false, 1175 | "price": { 1176 | "isStable": false, 1177 | "coingeckoId": "ethereum" 1178 | } 1179 | }, 1180 | "USDC": { 1181 | "symbol": "USDC", 1182 | "address": "0x1d17CBcF0D6D143135aE902365D2E5e2A16538D4", 1183 | "decimals": 6, 1184 | "tickerHash": "0xd6aca1be9729c13d677335161321649cccae6a591554772516700f986f942eaa", 1185 | "isNative": false, 1186 | "price": { 1187 | "isStable": true, 1188 | "coingeckoId": "usd-coin" 1189 | } 1190 | }, 1191 | "USDT": { 1192 | "symbol": "USDT", 1193 | "address": "0x493257fD37EDB34451f62EDf8D2a0C418852bA4C", 1194 | "decimals": 6, 1195 | "tickerHash": "0x8b1a1d9c2b109e527c9134b25b1a1833b16b6594f92daa9f6d9b7a6024bce9d0", 1196 | "isNative": false, 1197 | "price": { 1198 | "isStable": true, 1199 | "coingeckoId": "tether" 1200 | } 1201 | } 1202 | } 1203 | }, 1204 | "2020": { 1205 | "network": "evm", 1206 | "providers": [ 1207 | "https://api.roninchain.com/rpc" 1208 | ], 1209 | "subgraphUrls": [ 1210 | "https://api.goldsky.com/api/public/project_clssc64y57n5r010yeoly05up/subgraphs/everclear-spoke-ronin/production-v0.0.2/gn" 1211 | ], 1212 | "deployments": { 1213 | "everclear": "0xdCA40903E271Cc76AECd62dF8d6c19f3Ac873E64", 1214 | "gateway": "0x1FC1f47a6a7c61f53321643A14bEc044213AbF95", 1215 | "XERC20Module": "0x92dcaf947DB325ac023b105591d76315743883eD" 1216 | }, 1217 | "confirmations": 1, 1218 | "assets": { 1219 | "RON": { 1220 | "symbol": "RON", 1221 | "address": "0x0000000000000000000000000000000000000000", 1222 | "decimals": 18, 1223 | "tickerHash": "0x2dd272ddce846149d92496b4c3e677504aec8d5e6aab5908b25c9fe0a797e25f", 1224 | "isNative": true, 1225 | "price": { 1226 | "isStable": false, 1227 | "coingeckoId": "ron" 1228 | } 1229 | }, 1230 | "WETH": { 1231 | "symbol": "WETH", 1232 | "address": "0xc99a6a985ed2cac1ef41640596c5a5f9f4e19ef5", 1233 | "decimals": 18, 1234 | "tickerHash": "0x0f8a193ff464434486c0daf7db2a895884365d2bc84ba47a68fcf89c1b14b5b8", 1235 | "isNative": false, 1236 | "price": { 1237 | "isStable": false, 1238 | "coingeckoId": "ethereum" 1239 | } 1240 | }, 1241 | "USDC": { 1242 | "symbol": "USDC", 1243 | "address": "0x0B7007c13325C48911F73A2daD5FA5dCBf808aDc", 1244 | "decimals": 6, 1245 | "tickerHash": "0xd6aca1be9729c13d677335161321649cccae6a591554772516700f986f942eaa", 1246 | "isNative": false, 1247 | "price": { 1248 | "isStable": true, 1249 | "coingeckoId": "usd-coin" 1250 | } 1251 | } 1252 | } 1253 | }, 1254 | "1399811149": { 1255 | "network": "svm", 1256 | "providers": [ 1257 | "https://api.mainnet-beta.solana.com" 1258 | ], 1259 | "subgraphUrls": [ 1260 | "" 1261 | ], 1262 | "deployments": { 1263 | "everclear": "0x09b727b9209c8539f72647d10dd4f4670b53960ba169f034c513c758db0e9656", 1264 | "gateway": "0x09b727b9209c8539f72647d10dd4f4670b53960ba169f034c513c758db0e9656", 1265 | "XERC20Module": "0x09b727b9209c8539f72647d10dd4f4670b53960ba169f034c513c758db0e9656" 1266 | }, 1267 | "confirmations": 1, 1268 | "assets": { 1269 | "USDC": { 1270 | "symbol": "USDC", 1271 | "address": "0xc6fa7af3bedbad3a3d65f36aabc97431b1bbe4c2d2f6e0e47ca60203452f5d61", 1272 | "decimals": 6, 1273 | "tickerHash": "0xd6aca1be9729c13d677335161321649cccae6a591554772516700f986f942eaa", 1274 | "isNative": false, 1275 | "price": { 1276 | "isStable": true, 1277 | "coingeckoId": "usd-coin" 1278 | } 1279 | }, 1280 | "USDT": { 1281 | "symbol": "USDT", 1282 | "address": "0xce010e60afedb22717bd63192f54145a3f965a33bb82d2c7029eb2ce1e208264", 1283 | "decimals": 6, 1284 | "tickerHash": "0x8b1a1d9c2b109e527c9134b25b1a1833b16b6594f92daa9f6d9b7a6024bce9d0", 1285 | "isNative": false, 1286 | "price": { 1287 | "isStable": true, 1288 | "coingeckoId": "tether" 1289 | } 1290 | }, 1291 | "WETH": { 1292 | "symbol": "WETH", 1293 | "address": "0x66e5188a1308a1db90b6d31f3fbdca8c3df2678c8112dfdd3d192c5a3cc457a8", 1294 | "decimals": 8, 1295 | "tickerHash": "0x0f8a193ff464434486c0daf7db2a895884365d2bc84ba47a68fcf89c1b14b5b8", 1296 | "isNative": false, 1297 | "price": { 1298 | "isStable": false, 1299 | "coingeckoId": "ethereum" 1300 | } 1301 | } 1302 | } 1303 | }, 1304 | "80094": { 1305 | "network": "evm", 1306 | "providers": [ 1307 | "https://rpc.berachain.com" 1308 | ], 1309 | "subgraphUrls": [ 1310 | "https://api.goldsky.com/api/public/project_clssc64y57n5r010yeoly05up/subgraphs/everclear-spoke-berachain/production-v0.0.1/gn" 1311 | ], 1312 | "deployments": { 1313 | "everclear": "0xa05A3380889115bf313f1Db9d5f335157Be4D816", 1314 | "gateway": "0x9ADA72CCbAfe94248aFaDE6B604D1bEAacc899A7", 1315 | "XERC20Module": "0xD1daF260951B8d350a4AeD5C80d74Fd7298C93F4" 1316 | }, 1317 | "confirmations": 1, 1318 | "assets": { 1319 | "BERA": { 1320 | "symbol": "BERA", 1321 | "address": "0x0000000000000000000000000000000000000000", 1322 | "decimals": 18, 1323 | "tickerHash": "0x0d708a0a062f23db49bbf1d3467f3dd0f744c02724e060d3952139a0649eb83c", 1324 | "isNative": true, 1325 | "price": { 1326 | "isStable": false, 1327 | "coingeckoId": "berachain" 1328 | } 1329 | }, 1330 | "WETH": { 1331 | "symbol": "WETH", 1332 | "address": "0x2F6F07CDcf3588944Bf4C42aC74ff24bF56e7590", 1333 | "decimals": 18, 1334 | "tickerHash": "0x0f8a193ff464434486c0daf7db2a895884365d2bc84ba47a68fcf89c1b14b5b8", 1335 | "isNative": false, 1336 | "price": { 1337 | "isStable": false, 1338 | "coingeckoId": "ethereum" 1339 | } 1340 | }, 1341 | "USDC": { 1342 | "symbol": "USDC", 1343 | "address": "0x549943e04f40284185054145c6E4e9568C1D3241", 1344 | "decimals": 6, 1345 | "tickerHash": "0xd6aca1be9729c13d677335161321649cccae6a591554772516700f986f942eaa", 1346 | "isNative": false, 1347 | "price": { 1348 | "isStable": true, 1349 | "coingeckoId": "usd-coin" 1350 | } 1351 | }, 1352 | "WBTC": { 1353 | "symbol": "WBTC", 1354 | "address": "0x0555E30da8f98308EdB960aa94C0Db47230d2B9c", 1355 | "decimals": 8, 1356 | "tickerHash": "0x98da2c5e4c6b1db946694570273b859a6e4083ccc8faa155edfc4c54eb3cfd73", 1357 | "isNative": false, 1358 | "price": { 1359 | "isStable": false, 1360 | "coingeckoId": "bitcoin" 1361 | } 1362 | } 1363 | } 1364 | }, 1365 | "100": { 1366 | "network": "evm", 1367 | "providers": [ 1368 | "https://rpc.gnosis.gateway.fm" 1369 | ], 1370 | "subgraphUrls": [ 1371 | "https://api.goldsky.com/api/public/project_clssc64y57n5r010yeoly05up/subgraphs/everclear-spoke-gnosis/production-v0.0.2/gn" 1372 | ], 1373 | "deployments": { 1374 | "everclear": "0xe0F010e465f15dcD42098dF9b99F1038c11B3056", 1375 | "gateway": "0xeFa6Ac3F931620fD0449eC8c619f2A14A0A78E99", 1376 | "XERC20Module": "0xEFfAB7cCEBF63FbEFB4884964b12259d4374FaAa" 1377 | }, 1378 | "confirmations": 1, 1379 | "assets": {} 1380 | }, 1381 | "5000": { 1382 | "network": "evm", 1383 | "providers": [ 1384 | "https://mantle.drpc.org" 1385 | ], 1386 | "subgraphUrls": [ 1387 | "https://api.goldsky.com/api/public/project_clssc64y57n5r010yeoly05up/subgraphs/everclear-spoke-mantle/production-v0.0.1/gn" 1388 | ], 1389 | "deployments": { 1390 | "everclear": "0xe0F010e465f15dcD42098dF9b99F1038c11B3056", 1391 | "gateway": "0xeFa6Ac3F931620fD0449eC8c619f2A14A0A78E99", 1392 | "XERC20Module": "0xEFfAB7cCEBF63FbEFB4884964b12259d4374FaAa" 1393 | }, 1394 | "gasLimit": 250000000, 1395 | "confirmations": 1, 1396 | "assets": { 1397 | "MNT": { 1398 | "symbol": "MNT", 1399 | "address": "0x0000000000000000000000000000000000000000", 1400 | "decimals": 18, 1401 | "tickerHash": "0xcd021b8e001a22311e1ccbd0526db1cac113eab46048373ce0baf2c8da1f63fe", 1402 | "isNative": true, 1403 | "price": { 1404 | "isStable": false, 1405 | "coingeckoId": "mantle" 1406 | } 1407 | }, 1408 | "WETH": { 1409 | "symbol": "WETH", 1410 | "address": "0xdEAddEaDdeadDEadDEADDEAddEADDEAddead1111", 1411 | "decimals": 18, 1412 | "tickerHash": "0x0f8a193ff464434486c0daf7db2a895884365d2bc84ba47a68fcf89c1b14b5b8", 1413 | "isNative": false, 1414 | "price": { 1415 | "isStable": false, 1416 | "coingeckoId": "ethereum" 1417 | } 1418 | }, 1419 | "USDC": { 1420 | "symbol": "USDC", 1421 | "address": "0x09Bc4E0D864854c6aFB6eB9A9cdF58aC190D0dF9", 1422 | "decimals": 6, 1423 | "tickerHash": "0xd6aca1be9729c13d677335161321649cccae6a591554772516700f986f942eaa", 1424 | "isNative": false, 1425 | "price": { 1426 | "isStable": true, 1427 | "coingeckoId": "usd-coin" 1428 | } 1429 | }, 1430 | "USDT": { 1431 | "symbol": "USDT", 1432 | "address": "0x201EBa5CC46D216Ce6DC03F6a759e8E766e956aE", 1433 | "decimals": 6, 1434 | "tickerHash": "0x8b1a1d9c2b109e527c9134b25b1a1833b16b6594f92daa9f6d9b7a6024bce9d0", 1435 | "isNative": false, 1436 | "price": { 1437 | "isStable": true, 1438 | "coingeckoId": "tether" 1439 | } 1440 | }, 1441 | "WBTC": { 1442 | "symbol": "WBTC", 1443 | "address": "0xCAbAE6f6Ea1ecaB08Ad02fE02ce9A44F09aebfA2", 1444 | "decimals": 8, 1445 | "tickerHash": "0x98da2c5e4c6b1db946694570273b859a6e4083ccc8faa155edfc4c54eb3cfd73", 1446 | "isNative": false, 1447 | "price": { 1448 | "isStable": false, 1449 | "coingeckoId": "bitcoin" 1450 | } 1451 | } 1452 | } 1453 | }, 1454 | "146": { 1455 | "network": "evm", 1456 | "providers": [ 1457 | "https://sonic.drpc.org" 1458 | ], 1459 | "subgraphUrls": [ 1460 | "https://api.goldsky.com/api/public/project_clssc64y57n5r010yeoly05up/subgraphs/everclear-spoke-sonic/production-v0.0.1/gn" 1461 | ], 1462 | "deployments": { 1463 | "everclear": "0xa05A3380889115bf313f1Db9d5f335157Be4D816", 1464 | "gateway": "0x9ADA72CCbAfe94248aFaDE6B604D1bEAacc899A7", 1465 | "XERC20Module": "0xD1daF260951B8d350a4AeD5C80d74Fd7298C93F4" 1466 | }, 1467 | "gasLimit": 5000000000, 1468 | "confirmations": 1, 1469 | "assets": { 1470 | "SONIC": { 1471 | "symbol": "SONIC", 1472 | "address": "0x0000000000000000000000000000000000000000", 1473 | "decimals": 18, 1474 | "tickerHash": "0x517930d5cb7cf533eaeb6f47318cd4a252a29b00a0ffcc50df5f0fefc0a342f2", 1475 | "isNative": true, 1476 | "price": { 1477 | "isStable": false, 1478 | "coingeckoId": "sonic" 1479 | } 1480 | }, 1481 | "WETH": { 1482 | "symbol": "WETH", 1483 | "address": "0x50c42dEAcD8Fc9773493ED674b675bE577f2634b", 1484 | "decimals": 18, 1485 | "tickerHash": "0x0f8a193ff464434486c0daf7db2a895884365d2bc84ba47a68fcf89c1b14b5b8", 1486 | "isNative": false, 1487 | "price": { 1488 | "isStable": false, 1489 | "coingeckoId": "ethereum" 1490 | } 1491 | }, 1492 | "USDC": { 1493 | "symbol": "USDC", 1494 | "address": "0x29219dd400f2Bf60E5a23d13Be72B486D4038894", 1495 | "decimals": 6, 1496 | "tickerHash": "0xd6aca1be9729c13d677335161321649cccae6a591554772516700f986f942eaa", 1497 | "isNative": false, 1498 | "price": { 1499 | "isStable": true, 1500 | "coingeckoId": "usd-coin" 1501 | } 1502 | }, 1503 | "USDT": { 1504 | "symbol": "USDT", 1505 | "address": "0x6047828dc181963ba44974801FF68e538dA5eaF9", 1506 | "decimals": 6, 1507 | "tickerHash": "0x8b1a1d9c2b109e527c9134b25b1a1833b16b6594f92daa9f6d9b7a6024bce9d0", 1508 | "isNative": false, 1509 | "price": { 1510 | "isStable": true, 1511 | "coingeckoId": "tether" 1512 | } 1513 | } 1514 | } 1515 | }, 1516 | "57073": { 1517 | "network": "evm", 1518 | "providers": [ 1519 | "https://ink.drpc.org" 1520 | ], 1521 | "subgraphUrls": [ 1522 | "https://api.goldsky.com/api/public/project_clssc64y57n5r010yeoly05up/subgraphs/everclear-spoke-ink/production-v0.0.1/gn" 1523 | ], 1524 | "deployments": { 1525 | "everclear": "0xa05A3380889115bf313f1Db9d5f335157Be4D816", 1526 | "gateway": "0x9ADA72CCbAfe94248aFaDE6B604D1bEAacc899A7", 1527 | "XERC20Module": "0xD1daF260951B8d350a4AeD5C80d74Fd7298C93F4" 1528 | }, 1529 | "confirmations": 1, 1530 | "assets": { 1531 | "INK": { 1532 | "symbol": "INK", 1533 | "address": "0x0000000000000000000000000000000000000000", 1534 | "decimals": 18, 1535 | "tickerHash": "0x8e45e515a42c1a00b1df0dae2ba2aa6b6ce7e33ba3a197173c5d7f6970c2531c", 1536 | "isNative": true, 1537 | "price": { 1538 | "isStable": false, 1539 | "coingeckoId": "ink-chain" 1540 | } 1541 | }, 1542 | "WETH": { 1543 | "symbol": "WETH", 1544 | "address": "0x4200000000000000000000000000000000000006", 1545 | "decimals": 18, 1546 | "tickerHash": "0x0f8a193ff464434486c0daf7db2a895884365d2bc84ba47a68fcf89c1b14b5b8", 1547 | "isNative": false, 1548 | "price": { 1549 | "isStable": false, 1550 | "coingeckoId": "ethereum" 1551 | } 1552 | }, 1553 | "USDC": { 1554 | "symbol": "USDC", 1555 | "address": "0xF1815bd50389c46847f0Bda824eC8da914045D14", 1556 | "decimals": 6, 1557 | "tickerHash": "0xd6aca1be9729c13d677335161321649cccae6a591554772516700f986f942eaa", 1558 | "isNative": false, 1559 | "price": { 1560 | "isStable": true, 1561 | "coingeckoId": "usd-coin" 1562 | } 1563 | } 1564 | } 1565 | } 1566 | } 1567 | } 1568 | -------------------------------------------------------------------------------- /everclear.mainnet.staging.json: -------------------------------------------------------------------------------- 1 | { 2 | "hub": { 3 | "domain": "25327", 4 | "deployments": { 5 | "everclear": "0x372396818F125b8f3AA5a73e70C30F54c6195331", 6 | "gateway": "0xe5F2F4afAd6211cfBD6a882D5a6a435530Ee3909", 7 | "gauge": "0x0000000000000000000000000000000000000000", 8 | "rewardDistributor": "0x0000000000000000000000000000000000000000", 9 | "tokenomicsHubGateway": "0x0000000000000000000000000000000000000000" 10 | }, 11 | "providers": [ 12 | "https://rpc.everclear.raas.gelato.cloud" 13 | ], 14 | "subgraphUrls": [ 15 | "https://api.goldsky.com/api/public/project_clssc64y57n5r010yeoly05up/subgraphs/everclear-hub/staging-v0.0.1/gn" 16 | ], 17 | "confirmations": 0, 18 | "assets": { 19 | "ETH": { 20 | "symbol": "ETH", 21 | "address": "0x0000000000000000000000000000000000000000", 22 | "decimals": 18, 23 | "tickerHash": "0xaaaebeba3810b1e6b70781f14b2d72c1cb89c0b2b320c43bb67ff79f562f5ff4", 24 | "isNative": true, 25 | "price": { 26 | "isStable": false, 27 | "coingeckoId": "ethereum", 28 | "mainnetEquivalent": "0x0000000000000000000000000000000000000000" 29 | } 30 | }, 31 | "WETH": { 32 | "symbol": "WETH", 33 | "address": "0x2e31ebD2eB114943630Db6ba8c7f7687bdA5835F", 34 | "decimals": 18, 35 | "tickerHash": "0x0f8a193ff464434486c0daf7db2a895884365d2bc84ba47a68fcf89c1b14b5b8", 36 | "isNative": false, 37 | "price": { 38 | "isStable": false, 39 | "coingeckoId": "ethereum" 40 | } 41 | } 42 | } 43 | }, 44 | "chains": { 45 | "10": { 46 | "providers": [ 47 | "https://mainnet.optimism.io" 48 | ], 49 | "subgraphUrls": [ 50 | "https://api.goldsky.com/api/public/project_clssc64y57n5r010yeoly05up/subgraphs/everclear-spoke-optimism/staging-v0.0.3/gn" 51 | ], 52 | "deployments": { 53 | "everclear": "0x91c40B4135eFea3c5A200388CfE316aa0B172b30", 54 | "gateway": "0xe051C7AdB6F24Ee8c9d94DD23106C51D94858d12", 55 | "XERC20Module": "0x0000000000000000000000000000000000000000" 56 | }, 57 | "confirmations": 1, 58 | "assets": { 59 | "ETH": { 60 | "symbol": "ETH", 61 | "address": "0x0000000000000000000000000000000000000000", 62 | "decimals": 18, 63 | "tickerHash": "0xaaaebeba3810b1e6b70781f14b2d72c1cb89c0b2b320c43bb67ff79f562f5ff4", 64 | "isNative": true, 65 | "price": { 66 | "isStable": false, 67 | "priceFeed": "0x13e3Ee699D1909E989722E753853AE30b17e08c5", 68 | "coingeckoId": "ethereum" 69 | } 70 | }, 71 | "WETH": { 72 | "symbol": "WETH", 73 | "address": "0x4200000000000000000000000000000000000006", 74 | "decimals": 18, 75 | "tickerHash": "0x0f8a193ff464434486c0daf7db2a895884365d2bc84ba47a68fcf89c1b14b5b8", 76 | "isNative": false, 77 | "price": { 78 | "isStable": false, 79 | "priceFeed": "0x13e3Ee699D1909E989722E753853AE30b17e08c5", 80 | "coingeckoId": "ethereum" 81 | } 82 | }, 83 | "USDC": { 84 | "symbol": "USDC", 85 | "address": "0x0b2C639c533813f4Aa9D7837CAf62653d097Ff85", 86 | "decimals": 6, 87 | "tickerHash": "0xd6aca1be9729c13d677335161321649cccae6a591554772516700f986f942eaa", 88 | "isNative": false, 89 | "price": { 90 | "isStable": true, 91 | "priceFeed": "0x16a9FA2FDa030272Ce99B29CF780dFA30361E0f3", 92 | "coingeckoId": "usd-coin" 93 | } 94 | }, 95 | "USDT": { 96 | "symbol": "USDT", 97 | "address": "0x94b008aA00579c1307B0EF2c499aD98a8ce58e58", 98 | "decimals": 6, 99 | "tickerHash": "0x8b1a1d9c2b109e527c9134b25b1a1833b16b6594f92daa9f6d9b7a6024bce9d0", 100 | "isNative": false, 101 | "price": { 102 | "isStable": true, 103 | "priceFeed": "0xECef79E109e997bCA29c1c0897ec9d7b03647F5E", 104 | "coingeckoId": "tether" 105 | } 106 | } 107 | } 108 | }, 109 | "8453": { 110 | "providers": [ 111 | "https://base-mainnet.public.blastapi.io" 112 | ], 113 | "subgraphUrls": [ 114 | "https://api.goldsky.com/api/public/project_clssc64y57n5r010yeoly05up/subgraphs/everclear-spoke-base/staging-v0.0.1/gn" 115 | ], 116 | "deployments": { 117 | "everclear": "0x91c40B4135eFea3c5A200388CfE316aa0B172b30", 118 | "gateway": "0xe051C7AdB6F24Ee8c9d94DD23106C51D94858d12", 119 | "XERC20Module": "0x0000000000000000000000000000000000000000" 120 | }, 121 | "confirmations": 1, 122 | "assets": { 123 | "ETH": { 124 | "symbol": "ETH", 125 | "address": "0x0000000000000000000000000000000000000000", 126 | "decimals": 18, 127 | "tickerHash": "0xaaaebeba3810b1e6b70781f14b2d72c1cb89c0b2b320c43bb67ff79f562f5ff4", 128 | "isNative": true, 129 | "price": { 130 | "isStable": false, 131 | "priceFeed": "0x71041dddad3595F9CEd3DcCFBe3D1F4b0a16Bb70", 132 | "coingeckoId": "ethereum" 133 | } 134 | }, 135 | "WETH": { 136 | "symbol": "WETH", 137 | "address": "0x4200000000000000000000000000000000000006", 138 | "decimals": 18, 139 | "tickerHash": "0x0f8a193ff464434486c0daf7db2a895884365d2bc84ba47a68fcf89c1b14b5b8", 140 | "isNative": false, 141 | "price": { 142 | "isStable": false, 143 | "priceFeed": "0x71041dddad3595F9CEd3DcCFBe3D1F4b0a16Bb70", 144 | "coingeckoId": "ethereum" 145 | } 146 | }, 147 | "USDC": { 148 | "symbol": "USDC", 149 | "address": "0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913", 150 | "decimals": 6, 151 | "tickerHash": "0xd6aca1be9729c13d677335161321649cccae6a591554772516700f986f942eaa", 152 | "isNative": false, 153 | "price": { 154 | "isStable": true, 155 | "priceFeed": "0x7e860098F58bBFC8648a4311b374B1D669a2bc6B", 156 | "coingeckoId": "usd-coin" 157 | } 158 | }, 159 | "USDT": { 160 | "symbol": "USDT", 161 | "address": "0xfde4C96c8593536E31F229EA8f37b2ADa2699bb2", 162 | "decimals": 6, 163 | "tickerHash": "0x8b1a1d9c2b109e527c9134b25b1a1833b16b6594f92daa9f6d9b7a6024bce9d0", 164 | "isNative": false, 165 | "price": { 166 | "isStable": true, 167 | "priceFeed": "0x3f3f5dF88dC9F13eac63DF89EC16ef6e7E25DdE7", 168 | "coingeckoId": "tether" 169 | } 170 | }, 171 | "cbBTC": { 172 | "symbol": "cbBTC", 173 | "address": "0xcbB7C0000aB88B473b1f5aFd9ef808440eed33Bf", 174 | "decimals": 8, 175 | "tickerHash": "0xab7216efe876c5163ebb1d05a1a6b63e00fb73d1d68ddf079460c106356fd162", 176 | "isNative": false, 177 | "price": { 178 | "isStable": false, 179 | "coingeckoId": "coinbase-wrapped-btc" 180 | } 181 | } 182 | } 183 | }, 184 | "1399811149": { 185 | "network": "svm", 186 | "providers": [ 187 | "https://api.mainnet-beta.solana.com" 188 | ], 189 | "subgraphUrls": [ 190 | "https://api.goldsky.com/api/public/project_clssc64y57n5r010yeoly05up/subgraphs/everclear-spoke-base/staging-v0.0.1/gn" 191 | ], 192 | "deployments": { 193 | "everclear": "0x93958783d0fe999eb6cbf34416e40974ebf1d0a3896f698e13d02447a0919fac", 194 | "gateway": "0x93958783d0fe999eb6cbf34416e40974ebf1d0a3896f698e13d02447a0919fac", 195 | "XERC20Module": "0x93958783d0fe999eb6cbf34416e40974ebf1d0a3896f698e13d02447a0919fac" 196 | }, 197 | "confirmations": 1, 198 | "assets": { 199 | "USDC": { 200 | "symbol": "USDC", 201 | "address": "0xc6fa7af3bedbad3a3d65f36aabc97431b1bbe4c2d2f6e0e47ca60203452f5d61", 202 | "decimals": 6, 203 | "tickerHash": "0xd6aca1be9729c13d677335161321649cccae6a591554772516700f986f942eaa", 204 | "isNative": false, 205 | "price": { 206 | "isStable": true, 207 | "coingeckoId": "usd-coin" 208 | } 209 | }, 210 | "USDT": { 211 | "symbol": "USDT", 212 | "address": "0xce010e60afedb22717bd63192f54145a3f965a33bb82d2c7029eb2ce1e208264", 213 | "decimals": 6, 214 | "tickerHash": "0x8b1a1d9c2b109e527c9134b25b1a1833b16b6594f92daa9f6d9b7a6024bce9d0", 215 | "isNative": false, 216 | "price": { 217 | "isStable": true, 218 | "coingeckoId": "tether" 219 | } 220 | }, 221 | "WETH": { 222 | "symbol": "WETH", 223 | "address": "0x66e5188a1308a1db90b6d31f3fbdca8c3df2678c8112dfdd3d192c5a3cc457a8", 224 | "decimals": 18, 225 | "tickerHash": "0x0f8a193ff464434486c0daf7db2a895884365d2bc84ba47a68fcf89c1b14b5b8", 226 | "isNative": false, 227 | "price": { 228 | "isStable": false, 229 | "coingeckoId": "ethereum" 230 | } 231 | } 232 | } 233 | } 234 | } 235 | } 236 | -------------------------------------------------------------------------------- /everclear.testnet.json: -------------------------------------------------------------------------------- 1 | { 2 | "hub": { 3 | "domain": "6398", 4 | "deployments": { 5 | "everclear": "0x4C526917051ee1981475BB6c49361B0756F505a8", 6 | "gateway": "0x4b0017AD0CAbdf72106fC5d6B15e366A9A47DD25", 7 | "gauge": "0xcCc18f3b67891f997F1953D0eF7D0061283f79a7", 8 | "rewardDistributor": "0x97feDC821d2Fc6018f71152F9f6193749f614105", 9 | "tokenomicsHubGateway": "0x07CcA2Afc3Ea339Bf7d616386bEA1C42bd68282a" 10 | }, 11 | "providers": ["https://rpc.connext-sepolia.gelato.digital"], 12 | "subgraphUrls": [ 13 | "https://api.goldsky.com/api/public/project_clssc64y57n5r010yeoly05up/subgraphs/everclear-hub-sepolia/production-v0.0.3/gn" 14 | ], 15 | "confirmations": 0, 16 | "assets": { 17 | "ETH": { 18 | "symbol": "ETH", 19 | "address": "0x0000000000000000000000000000000000000000", 20 | "decimals": 18, 21 | "tickerHash": "0xaaaebeba3810b1e6b70781f14b2d72c1cb89c0b2b320c43bb67ff79f562f5ff4", 22 | "isNative": true, 23 | "price": { 24 | "isStable": false, 25 | "priceFeed": "0x694AA1769357215DE4FAC081bf1f309aDC325306", 26 | "coingeckoId": "ethereum" 27 | } 28 | }, 29 | "WETH": { 30 | "symbol": "WETH", 31 | "address": "0x5d92e0F1F334BB0b475677F17E71f98D2b5807b1", 32 | "decimals": 18, 33 | "tickerHash": "0x0f8a193ff464434486c0daf7db2a895884365d2bc84ba47a68fcf89c1b14b5b8", 34 | "isNative": false, 35 | "price": { 36 | "isStable": false, 37 | "priceFeed": "0x694AA1769357215DE4FAC081bf1f309aDC325306", 38 | "coingeckoId": "ethereum" 39 | } 40 | }, 41 | "TEST": { 42 | "symbol": "TEST", 43 | "address": "0xF8D5414E17F6b2ad6020D29AdF070aC9e39AfC35", 44 | "decimals": 18, 45 | "tickerHash": "0x852daa74cc3c31fe64542bb9b8764cfb91cc30f9acf9389071ffb44a9eefde46", 46 | "isNative": false, 47 | "price": { 48 | "isStable": false, 49 | "coingeckoId": "connext" 50 | } 51 | } 52 | } 53 | }, 54 | "chains": { 55 | "11155111": { 56 | "providers": ["https://ethereum-sepolia-rpc.publicnode.com"], 57 | "subgraphUrls": [ 58 | "https://api.goldsky.com/api/public/project_clssc64y57n5r010yeoly05up/subgraphs/everclear-spoke-sepolia/production-v0.0.4/gn" 59 | ], 60 | "deployments": { 61 | "everclear": "0x3650432cB5331e6dc95be8C1d8168b7c37f677e2", 62 | "gateway": "0x37f1E1C89306c0e95bfa3221Ef7D364886e43047", 63 | "XERC20Module": "0xEf692e455B5C5169815af59b2595656231838f71" 64 | }, 65 | "confirmations": 2, 66 | "assets": { 67 | "ETH": { 68 | "symbol": "ETH", 69 | "address": "0x0000000000000000000000000000000000000000", 70 | "decimals": 18, 71 | "tickerHash": "0xaaaebeba3810b1e6b70781f14b2d72c1cb89c0b2b320c43bb67ff79f562f5ff4", 72 | "isNative": true, 73 | "price": { 74 | "isStable": false, 75 | "priceFeed": "0x694AA1769357215DE4FAC081bf1f309aDC325306", 76 | "coingeckoId": "ethereum" 77 | } 78 | }, 79 | "TEST": { 80 | "symbol": "TEST", 81 | "address": "0xd26e3540A0A368845B234736A0700E0a5A821bBA", 82 | "decimals": 18, 83 | "tickerHash": "0x852daa74cc3c31fe64542bb9b8764cfb91cc30f9acf9389071ffb44a9eefde46", 84 | "isNative": false, 85 | "price": { 86 | "isStable": true, 87 | "coingeckoId": "usd-coin" 88 | } 89 | }, 90 | "DTT": { 91 | "symbol": "DTT", 92 | "address": "0xd18C5E22E67947C8f3E112C622036E65a49773ab", 93 | "decimals": 6, 94 | "tickerHash": "0x0862d7701ae2a04548299440d8e9bcde598aaa04f40d2b263697efe0cc6c0bb4", 95 | "isNative": false, 96 | "price": { 97 | "isStable": true, 98 | "coingeckoId": "usd-coin" 99 | } 100 | }, 101 | "xTEST": { 102 | "symbol": "xTEST", 103 | "address": "0x8F936120b6c5557e7Cd449c69443FfCb13005751", 104 | "decimals": 18, 105 | "tickerHash": "0x1c1f1b017c99eb3cc5da6ca4df343dd8e3a7ba78771bba1390acc3801811e42d", 106 | "isNative": false, 107 | "price": { 108 | "isStable": true, 109 | "coingeckoId": "usd-coin" 110 | } 111 | } 112 | } 113 | }, 114 | "97": { 115 | "gasLimit": 120000000, 116 | "providers": ["https://data-seed-prebsc-1-s1.bnbchain.org:8545"], 117 | "subgraphUrls": [ 118 | "https://api.goldsky.com/api/public/project_clssc64y57n5r010yeoly05up/subgraphs/everclear-spoke-chapel/production-v0.0.4/gn" 119 | ], 120 | "deployments": { 121 | "everclear": "0xFeaaF6291E40252413aA6cb5214F486c8088207e", 122 | "gateway": "0xCBFCE40d758564B855506Db7Ff15F1978B8E0Fa1", 123 | "XERC20Module": "0x9bB91EcC8Fe324Bbf0112FB269F31d818388a30b" 124 | }, 125 | "confirmations": 1, 126 | "assets": { 127 | "BNB": { 128 | "symbol": "BNB", 129 | "address": "0x0000000000000000000000000000000000000000", 130 | "decimals": 18, 131 | "tickerHash": "0x3ed03c38e59dc60c7b69c2a4bf68f9214acd953252b5a90e8f5f59583e9bc3ae", 132 | "isNative": true, 133 | "price": { 134 | "isStable": false, 135 | "priceFeed": "0x2514895c72f50D8bd4B4F9b1110F0D6bD2c97526", 136 | "coingeckoId": "binancecoin" 137 | } 138 | }, 139 | "TEST": { 140 | "symbol": "TEST", 141 | "address": "0x5f921E4DE609472632CEFc72a3846eCcfbed4ed8", 142 | "decimals": 18, 143 | "tickerHash": "0x852daa74cc3c31fe64542bb9b8764cfb91cc30f9acf9389071ffb44a9eefde46", 144 | "isNative": false, 145 | "price": { 146 | "isStable": true, 147 | "coingeckoId": "usd-coin" 148 | } 149 | }, 150 | "DTT": { 151 | "symbol": "DTT", 152 | "address": "0xdef63AA35372780f8F92498a94CD0fA30A9beFbB", 153 | "decimals": 18, 154 | "tickerHash": "0x0862d7701ae2a04548299440d8e9bcde598aaa04f40d2b263697efe0cc6c0bb4", 155 | "isNative": false, 156 | "price": { 157 | "isStable": true, 158 | "coingeckoId": "usd-coin" 159 | } 160 | }, 161 | "xTEST": { 162 | "symbol": "xTEST", 163 | "address": "0x9064cD072D5cEfe70f854155d1b23171013be5c7", 164 | "decimals": 18, 165 | "tickerHash": "0x1c1f1b017c99eb3cc5da6ca4df343dd8e3a7ba78771bba1390acc3801811e42d", 166 | "isNative": false, 167 | "price": { 168 | "isStable": true, 169 | "coingeckoId": "usd-coin" 170 | } 171 | } 172 | } 173 | }, 174 | "11155420": { 175 | "providers": ["https://sepolia.optimism.io"], 176 | "subgraphUrls": [ 177 | "https://api.goldsky.com/api/public/project_clssc64y57n5r010yeoly05up/subgraphs/everclear-spoke-op-sepolia/production-v0.0.4/gn" 178 | ], 179 | "deployments": { 180 | "everclear": "0xf9A4d8cED1b8c53B39429BB9a8A391b74E85aE5C", 181 | "gateway": "0xfea15B6F776aA3a84d70e5D98E48f19556F76eb7", 182 | "XERC20Module": "0xBF8779e3baa2b7D62ba5e286b350F4e26488E53a" 183 | }, 184 | "confirmations": 1, 185 | "assets": { 186 | "ETH": { 187 | "symbol": "ETH", 188 | "address": "0x0000000000000000000000000000000000000000", 189 | "decimals": 18, 190 | "tickerHash": "0xaaaebeba3810b1e6b70781f14b2d72c1cb89c0b2b320c43bb67ff79f562f5ff4", 191 | "isNative": true, 192 | "price": { 193 | "isStable": false, 194 | "priceFeed": "0x694AA1769357215DE4FAC081bf1f309aDC325306", 195 | "coingeckoId": "ethereum" 196 | } 197 | }, 198 | "TEST": { 199 | "symbol": "TEST", 200 | "address": "0x7Fa13D6CB44164ea09dF8BCc673A8849092D435b", 201 | "decimals": 18, 202 | "tickerHash": "0x852daa74cc3c31fe64542bb9b8764cfb91cc30f9acf9389071ffb44a9eefde46", 203 | "isNative": false, 204 | "price": { 205 | "isStable": true, 206 | "coingeckoId": "usd-coin" 207 | } 208 | }, 209 | "DTT": { 210 | "symbol": "DTT", 211 | "address": "0x294FD6cfb1AB97Ad5EA325207fF1d0E85b9C693f", 212 | "decimals": 6, 213 | "tickerHash": "0x0862d7701ae2a04548299440d8e9bcde598aaa04f40d2b263697efe0cc6c0bb4", 214 | "isNative": false, 215 | "price": { 216 | "isStable": true, 217 | "coingeckoId": "usd-coin" 218 | } 219 | }, 220 | "xTEST": { 221 | "symbol": "xTEST", 222 | "address": "0xD3D4c6845e297e99e219BD8e3CaC84CA013c0770", 223 | "decimals": 18, 224 | "tickerHash": "0x1c1f1b017c99eb3cc5da6ca4df343dd8e3a7ba78771bba1390acc3801811e42d", 225 | "isNative": false, 226 | "price": { 227 | "isStable": true, 228 | "coingeckoId": "usd-coin" 229 | } 230 | } 231 | } 232 | }, 233 | "421614": { 234 | "providers": [ 235 | "https://endpoints.omniatech.io/v1/arbitrum/sepolia/public" 236 | ], 237 | "subgraphUrls": [ 238 | "https://api.goldsky.com/api/public/project_clssc64y57n5r010yeoly05up/subgraphs/everclear-spoke-arb-sepolia/production-v0.0.4/gn" 239 | ], 240 | "deployments": { 241 | "everclear": "0x97f24e4eeD4d05D48cb8a45ADfE5e6aF2de14F71", 242 | "gateway": "0x0A1bcEE4F09B691EbFbb3a5b83221A7Ce896c6bd", 243 | "XERC20Module": "0x83d58be7DAbd2C12df29FE80d24a0A661BC88B11" 244 | }, 245 | "confirmations": 1, 246 | "assets": { 247 | "ETH": { 248 | "symbol": "ETH", 249 | "address": "0x0000000000000000000000000000000000000000", 250 | "decimals": 18, 251 | "tickerHash": "0xaaaebeba3810b1e6b70781f14b2d72c1cb89c0b2b320c43bb67ff79f562f5ff4", 252 | "isNative": true, 253 | "price": { 254 | "isStable": false, 255 | "priceFeed": "0x694AA1769357215DE4FAC081bf1f309aDC325306", 256 | "coingeckoId": "ethereum" 257 | } 258 | }, 259 | "TEST": { 260 | "symbol": "TEST", 261 | "address": "0xaBF282c88DeD3e386701a322e76456c062468Ac2", 262 | "decimals": 18, 263 | "tickerHash": "0x852daa74cc3c31fe64542bb9b8764cfb91cc30f9acf9389071ffb44a9eefde46", 264 | "isNative": false, 265 | "price": { 266 | "isStable": true, 267 | "coingeckoId": "usd-coin" 268 | } 269 | }, 270 | "DTT": { 271 | "symbol": "DTT", 272 | "address": "0xDFEA0bb49bcdCaE920eb39F48156B857e817840F", 273 | "decimals": 6, 274 | "tickerHash": "0x0862d7701ae2a04548299440d8e9bcde598aaa04f40d2b263697efe0cc6c0bb4", 275 | "isNative": false, 276 | "price": { 277 | "isStable": true, 278 | "coingeckoId": "usd-coin" 279 | } 280 | }, 281 | "xTEST": { 282 | "symbol": "xTEST", 283 | "address": "0xd6dF5E67e2DEF6b1c98907d9a09c18b2b7cd32C3", 284 | "decimals": 18, 285 | "tickerHash": "0x1c1f1b017c99eb3cc5da6ca4df343dd8e3a7ba78771bba1390acc3801811e42d", 286 | "isNative": false, 287 | "price": { 288 | "isStable": true, 289 | "coingeckoId": "usd-coin" 290 | } 291 | } 292 | } 293 | } 294 | } 295 | } 296 | -------------------------------------------------------------------------------- /everclear.testnet.staging.json: -------------------------------------------------------------------------------- 1 | { 2 | "hub": { 3 | "domain": "6398", 4 | "deployments": { 5 | "everclear": "0xd05a33e7C55551D7D0015aa156b006531Fc33ED2", 6 | "gateway": "0x63A8fAF04b492b9c418D24C38159CbDF61613466" 7 | }, 8 | "providers": [ 9 | "https://rpc.connext-sepolia.gelato.digital" 10 | ], 11 | "subgraphUrls": [ 12 | "https://api.goldsky.com/api/public/project_clssc64y57n5r010yeoly05up/subgraphs/everclear-hub-sepolia/staging-v0.0.2/gn" 13 | ], 14 | "confirmations": 0, 15 | "assets": { 16 | "ETH": { 17 | "symbol": "ETH", 18 | "address": "0x0000000000000000000000000000000000000000", 19 | "decimals": 18, 20 | "tickerHash": "0xaaaebeba3810b1e6b70781f14b2d72c1cb89c0b2b320c43bb67ff79f562f5ff4", 21 | "isNative": true, 22 | "price": { 23 | "isStable": false, 24 | "priceFeed": "0x694AA1769357215DE4FAC081bf1f309aDC325306", 25 | "coingeckoId": "ethereum" 26 | } 27 | } 28 | } 29 | }, 30 | "chains": { 31 | "11155111": { 32 | "providers": [ 33 | "https://ethereum-sepolia-rpc.publicnode.com" 34 | ], 35 | "subgraphUrls": [ 36 | "https://api.goldsky.com/api/public/project_clssc64y57n5r010yeoly05up/subgraphs/everclear-spoke-sepolia/staging-v0.0.14/gn" 37 | ], 38 | "deployments": { 39 | "everclear": "0xda058E1bD948457EB166D304a2680Fe1c813AC21", 40 | "gateway": "0x645219a36CB7254Ea367B645ED3eA512e14BBbEA" 41 | }, 42 | "confirmations": 2, 43 | "assets": { 44 | "ETH": { 45 | "symbol": "ETH", 46 | "address": "0x0000000000000000000000000000000000000000", 47 | "decimals": 18, 48 | "tickerHash": "0xaaaebeba3810b1e6b70781f14b2d72c1cb89c0b2b320c43bb67ff79f562f5ff4", 49 | "isNative": true, 50 | "price": { 51 | "isStable": false, 52 | "priceFeed": "0x694AA1769357215DE4FAC081bf1f309aDC325306", 53 | "coingeckoId": "ethereum" 54 | } 55 | }, 56 | "TEST": { 57 | "symbol": "TEST", 58 | "address": "0xd26e3540A0A368845B234736A0700E0a5A821bBA", 59 | "decimals": 18, 60 | "tickerHash": "0x852daa74cc3c31fe64542bb9b8764cfb91cc30f9acf9389071ffb44a9eefde46", 61 | "isNative": false, 62 | "price": { 63 | "isStable": true, 64 | "coingeckoId": "usd-coin" 65 | } 66 | }, 67 | "DTT": { 68 | "symbol": "DTT", 69 | "address": "0xd18C5E22E67947C8f3E112C622036E65a49773ab", 70 | "decimals": 6, 71 | "tickerHash": "0x0862d7701ae2a04548299440d8e9bcde598aaa04f40d2b263697efe0cc6c0bb4", 72 | "isNative": false, 73 | "price": { 74 | "isStable": true, 75 | "coingeckoId": "usd-coin" 76 | } 77 | }, 78 | "xTEST": { 79 | "symbol": "xTEST", 80 | "address": "0x8F936120b6c5557e7Cd449c69443FfCb13005751", 81 | "decimals": 18, 82 | "tickerHash": "0x1c1f1b017c99eb3cc5da6ca4df343dd8e3a7ba78771bba1390acc3801811e42d", 83 | "isNative": false, 84 | "price": { 85 | "isStable": true, 86 | "coingeckoId": "usd-coin" 87 | } 88 | } 89 | } 90 | }, 91 | "97": { 92 | "gasLimit": 70000000, 93 | "providers": [ 94 | "https://data-seed-prebsc-1-s1.bnbchain.org:8545" 95 | ], 96 | "subgraphUrls": [ 97 | "https://api.goldsky.com/api/public/project_clssc64y57n5r010yeoly05up/subgraphs/everclear-spoke-chapel/staging-v0.0.14/gn" 98 | ], 99 | "deployments": { 100 | "everclear": "0xda058E1bD948457EB166D304a2680Fe1c813AC21", 101 | "gateway": "0x645219a36CB7254Ea367B645ED3eA512e14BBbEA" 102 | }, 103 | "confirmations": 1, 104 | "assets": { 105 | "BNB": { 106 | "symbol": "BNB", 107 | "address": "0x0000000000000000000000000000000000000000", 108 | "decimals": 18, 109 | "tickerHash": "0x3ed03c38e59dc60c7b69c2a4bf68f9214acd953252b5a90e8f5f59583e9bc3ae", 110 | "isNative": true, 111 | "price": { 112 | "isStable": false, 113 | "priceFeed": "0x2514895c72f50D8bd4B4F9b1110F0D6bD2c97526", 114 | "coingeckoId": "binancecoin" 115 | } 116 | }, 117 | "TEST": { 118 | "symbol": "TEST", 119 | "address": "0x5f921E4DE609472632CEFc72a3846eCcfbed4ed8", 120 | "decimals": 18, 121 | "tickerHash": "0x852daa74cc3c31fe64542bb9b8764cfb91cc30f9acf9389071ffb44a9eefde46", 122 | "isNative": false, 123 | "price": { 124 | "isStable": true, 125 | "coingeckoId": "usd-coin" 126 | } 127 | }, 128 | "DTT": { 129 | "symbol": "DTT", 130 | "address": "0xdef63AA35372780f8F92498a94CD0fA30A9beFbB", 131 | "decimals": 18, 132 | "tickerHash": "0x0862d7701ae2a04548299440d8e9bcde598aaa04f40d2b263697efe0cc6c0bb4", 133 | "isNative": false, 134 | "price": { 135 | "isStable": true, 136 | "coingeckoId": "usd-coin" 137 | } 138 | }, 139 | "xTEST": { 140 | "symbol": "xTEST", 141 | "address": "0x9064cD072D5cEfe70f854155d1b23171013be5c7", 142 | "decimals": 18, 143 | "tickerHash": "0x1c1f1b017c99eb3cc5da6ca4df343dd8e3a7ba78771bba1390acc3801811e42d", 144 | "isNative": false, 145 | "price": { 146 | "isStable": true, 147 | "coingeckoId": "usd-coin" 148 | } 149 | } 150 | } 151 | }, 152 | "11155420": { 153 | "providers": [ 154 | "https://sepolia.optimism.io" 155 | ], 156 | "subgraphUrls": [ 157 | "https://api.goldsky.com/api/public/project_clssc64y57n5r010yeoly05up/subgraphs/everclear-spoke-op-sepolia/staging-v0.0.14/gn" 158 | ], 159 | "deployments": { 160 | "everclear": "0xda058E1bD948457EB166D304a2680Fe1c813AC21", 161 | "gateway": "0x645219a36CB7254Ea367B645ED3eA512e14BBbEA" 162 | }, 163 | "confirmations": 1, 164 | "assets": { 165 | "ETH": { 166 | "symbol": "ETH", 167 | "address": "0x0000000000000000000000000000000000000000", 168 | "decimals": 18, 169 | "tickerHash": "0xaaaebeba3810b1e6b70781f14b2d72c1cb89c0b2b320c43bb67ff79f562f5ff4", 170 | "isNative": true, 171 | "price": { 172 | "isStable": false, 173 | "priceFeed": "0x694AA1769357215DE4FAC081bf1f309aDC325306", 174 | "coingeckoId": "ethereum" 175 | } 176 | }, 177 | "TEST": { 178 | "symbol": "TEST", 179 | "address": "0x7Fa13D6CB44164ea09dF8BCc673A8849092D435b", 180 | "decimals": 18, 181 | "tickerHash": "0x852daa74cc3c31fe64542bb9b8764cfb91cc30f9acf9389071ffb44a9eefde46", 182 | "isNative": false, 183 | "price": { 184 | "isStable": true, 185 | "coingeckoId": "usd-coin" 186 | } 187 | }, 188 | "DTT": { 189 | "symbol": "DTT", 190 | "address": "0x294FD6cfb1AB97Ad5EA325207fF1d0E85b9C693f", 191 | "decimals": 6, 192 | "tickerHash": "0x0862d7701ae2a04548299440d8e9bcde598aaa04f40d2b263697efe0cc6c0bb4", 193 | "isNative": false, 194 | "price": { 195 | "isStable": true, 196 | "coingeckoId": "usd-coin" 197 | } 198 | }, 199 | "xTEST": { 200 | "symbol": "xTEST", 201 | "address": "0xD3D4c6845e297e99e219BD8e3CaC84CA013c0770", 202 | "decimals": 18, 203 | "tickerHash": "0x1c1f1b017c99eb3cc5da6ca4df343dd8e3a7ba78771bba1390acc3801811e42d", 204 | "isNative": false, 205 | "price": { 206 | "isStable": true, 207 | "coingeckoId": "usd-coin" 208 | } 209 | } 210 | } 211 | }, 212 | "421614": { 213 | "providers": [ 214 | "https://endpoints.omniatech.io/v1/arbitrum/sepolia/public" 215 | ], 216 | "subgraphUrls": [ 217 | "https://api.goldsky.com/api/public/project_clssc64y57n5r010yeoly05up/subgraphs/everclear-spoke-arb-sepolia/staging-v0.0.14/gn" 218 | ], 219 | "deployments": { 220 | "everclear": "0xda058E1bD948457EB166D304a2680Fe1c813AC21", 221 | "gateway": "0x645219a36CB7254Ea367B645ED3eA512e14BBbEA" 222 | }, 223 | "confirmations": 1, 224 | "assets": { 225 | "ETH": { 226 | "symbol": "ETH", 227 | "address": "0x0000000000000000000000000000000000000000", 228 | "decimals": 18, 229 | "tickerHash": "0xaaaebeba3810b1e6b70781f14b2d72c1cb89c0b2b320c43bb67ff79f562f5ff4", 230 | "isNative": true, 231 | "price": { 232 | "isStable": false, 233 | "priceFeed": "0x694AA1769357215DE4FAC081bf1f309aDC325306", 234 | "coingeckoId": "ethereum" 235 | } 236 | }, 237 | "TEST": { 238 | "symbol": "TEST", 239 | "address": "0xaBF282c88DeD3e386701a322e76456c062468Ac2", 240 | "decimals": 18, 241 | "tickerHash": "0x852daa74cc3c31fe64542bb9b8764cfb91cc30f9acf9389071ffb44a9eefde46", 242 | "isNative": false, 243 | "price": { 244 | "isStable": true, 245 | "coingeckoId": "usd-coin" 246 | } 247 | }, 248 | "DTT": { 249 | "symbol": "DTT", 250 | "address": "0xDFEA0bb49bcdCaE920eb39F48156B857e817840F", 251 | "decimals": 6, 252 | "tickerHash": "0x0862d7701ae2a04548299440d8e9bcde598aaa04f40d2b263697efe0cc6c0bb4", 253 | "isNative": false, 254 | "price": { 255 | "isStable": true, 256 | "coingeckoId": "usd-coin" 257 | } 258 | }, 259 | "xTEST": { 260 | "symbol": "xTEST", 261 | "address": "0xd6dF5E67e2DEF6b1c98907d9a09c18b2b7cd32C3", 262 | "decimals": 18, 263 | "tickerHash": "0x1c1f1b017c99eb3cc5da6ca4df343dd8e3a7ba78771bba1390acc3801811e42d", 264 | "isNative": false, 265 | "price": { 266 | "isStable": true, 267 | "coingeckoId": "usd-coin" 268 | } 269 | } 270 | } 271 | } 272 | } 273 | } 274 | -------------------------------------------------------------------------------- /main.tf: -------------------------------------------------------------------------------- 1 | terraform { 2 | backend "s3" { 3 | bucket = "connext-terraform-state-file-chaindata" 4 | key = "state" 5 | region = "us-east-2" 6 | } 7 | } 8 | 9 | 10 | provider "aws" { 11 | region = "us-east-2" 12 | alias = "aws_cloudfront" 13 | } 14 | 15 | 16 | provider "aws" { 17 | region = "us-east-2" 18 | } 19 | 20 | 21 | module "cloudfront_s3_assets" { 22 | source = "./config" 23 | domain_name = "connext-chaindata" 24 | } 25 | 26 | -------------------------------------------------------------------------------- /outputs.tf: -------------------------------------------------------------------------------- 1 | output "cloudfront_domain_name" { 2 | value = module.cloudfront_s3_assets.cloudfront_domain_name 3 | } 4 | 5 | output "cloudfront_dist_id" { 6 | value = module.cloudfront_s3_assets.cloudfront_dist_id 7 | } 8 | 9 | output "s3_domain_name" { 10 | value = module.cloudfront_s3_assets.s3_domain_name 11 | } 12 | 13 | output "s3_bucket_arn" { 14 | value = module.cloudfront_s3_assets.s3_bucket_arn 15 | } 16 | 17 | output "s3_bucket_name" { 18 | value = module.cloudfront_s3_assets.s3_bucket_name 19 | } -------------------------------------------------------------------------------- /package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "@connext/chaindata", 3 | "version": "0.0.1", 4 | "description": "Chain and token information across EVM compatible chains", 5 | "main": "deploy.js", 6 | "scripts": { 7 | "test": "echo \"Error: no test specified\" && exit 1" 8 | }, 9 | "repository": { 10 | "type": "git", 11 | "url": "git+https://github.com/connext/chaindata.git" 12 | }, 13 | "author": "Connext and friends", 14 | "license": "ISC", 15 | "dependencies": { 16 | "ethers": "^5.0.32", 17 | "node-fetch": "^2.6.1", 18 | "request": "^2.88.2", 19 | "request-promise-native": "^1.0.9", 20 | "solidity-create2-deployer": "^0.4.0" 21 | }, 22 | "bugs": { 23 | "url": "https://github.com/connext/chaindata/issues" 24 | }, 25 | "homepage": "https://github.com/connext/chaindata#readme" 26 | } 27 | --------------------------------------------------------------------------------