From 8df70da8502701ca4efb39533528051a683e2f30 Mon Sep 17 00:00:00 2001 From: Andres Adjimann Date: Wed, 1 Mar 2023 17:00:35 -0300 Subject: [PATCH] feat: deploy workspace --- packages/deploy/.env.example | 49 + packages/deploy/.gitignore | 10 + packages/deploy/contracts/.gitkeep | 1 + .../layer2/10_deploy_trusted_forwarder.ts | 19 + .../layer2/20_deploy_trusted_forwarder_v2.ts | 19 + .../layer2/30_deploy_child_chain_manager.ts | 19 + packages/deploy/deploy/100_develop.ts | 17 + packages/deploy/deploy/100_production.ts | 15 + .../10_sand/10_layer1/10_deploy_sand.ts | 23 + .../10_sand/10_layer1/20_deploy_permit.ts | 24 + .../10_sand/10_layer1/30_set_permit_sand.ts | 35 + .../10_sand/10_layer1/40_set_sand_admin.ts | 40 + .../10_sand/10_layer1/50_deploy_faucet.ts | 28 + .../10_sand/10_layer2/10_deploy_sand.ts | 32 + .../10_sand/10_layer2/20_deploy_faucet.ts | 28 + .../10_layer2/30_setup_trusted_forwarder.ts | 35 + .../10_layer2/40_transfer_admin_and_owner.ts | 31 + packages/deploy/deployments/ethereum/.chainId | 1 + .../deploy/deployments/ethereum/Sand.json | 879 +++++++++++++ packages/deploy/deployments/goerli/.chainId | 1 + packages/deploy/deployments/mumbai/.chainId | 0 packages/deploy/deployments/polygon/.chainId | 1 + .../polygon/CHILD_CHAIN_MANAGER.json | 391 ++++++ .../deployments/polygon/PolygonSand.json | 1086 +++++++++++++++++ .../polygon/TRUSTED_FORWARDER_V2.json | 618 ++++++++++ packages/deploy/deployments/rinkeby/.chainId | 1 + packages/deploy/hardhat.config.ts | 101 ++ packages/deploy/package.json | 41 + packages/deploy/tasks/extendDeployTask.ts | 28 + packages/deploy/tasks/printFQN.ts | 7 + packages/deploy/test/deployments.ts | 77 ++ packages/deploy/utils/deploymentSkip.ts | 32 + packages/deploy/utils/hardhatConfig.ts | 70 ++ packages/deploy/utils/testUtils.ts | 25 + yarn.lock | 260 +++- 35 files changed, 4030 insertions(+), 14 deletions(-) create mode 100644 packages/deploy/.env.example create mode 100644 packages/deploy/.gitignore create mode 100644 packages/deploy/contracts/.gitkeep create mode 100644 packages/deploy/deploy/01_external/layer2/10_deploy_trusted_forwarder.ts create mode 100644 packages/deploy/deploy/01_external/layer2/20_deploy_trusted_forwarder_v2.ts create mode 100644 packages/deploy/deploy/01_external/layer2/30_deploy_child_chain_manager.ts create mode 100644 packages/deploy/deploy/100_develop.ts create mode 100644 packages/deploy/deploy/100_production.ts create mode 100644 packages/deploy/deploy/10_sand/10_layer1/10_deploy_sand.ts create mode 100644 packages/deploy/deploy/10_sand/10_layer1/20_deploy_permit.ts create mode 100644 packages/deploy/deploy/10_sand/10_layer1/30_set_permit_sand.ts create mode 100644 packages/deploy/deploy/10_sand/10_layer1/40_set_sand_admin.ts create mode 100644 packages/deploy/deploy/10_sand/10_layer1/50_deploy_faucet.ts create mode 100644 packages/deploy/deploy/10_sand/10_layer2/10_deploy_sand.ts create mode 100644 packages/deploy/deploy/10_sand/10_layer2/20_deploy_faucet.ts create mode 100644 packages/deploy/deploy/10_sand/10_layer2/30_setup_trusted_forwarder.ts create mode 100644 packages/deploy/deploy/10_sand/10_layer2/40_transfer_admin_and_owner.ts create mode 100644 packages/deploy/deployments/ethereum/.chainId create mode 100644 packages/deploy/deployments/ethereum/Sand.json create mode 100644 packages/deploy/deployments/goerli/.chainId create mode 100644 packages/deploy/deployments/mumbai/.chainId create mode 100644 packages/deploy/deployments/polygon/.chainId create mode 100644 packages/deploy/deployments/polygon/CHILD_CHAIN_MANAGER.json create mode 100644 packages/deploy/deployments/polygon/PolygonSand.json create mode 100644 packages/deploy/deployments/polygon/TRUSTED_FORWARDER_V2.json create mode 100644 packages/deploy/deployments/rinkeby/.chainId create mode 100644 packages/deploy/hardhat.config.ts create mode 100644 packages/deploy/package.json create mode 100644 packages/deploy/tasks/extendDeployTask.ts create mode 100644 packages/deploy/tasks/printFQN.ts create mode 100644 packages/deploy/test/deployments.ts create mode 100644 packages/deploy/utils/deploymentSkip.ts create mode 100644 packages/deploy/utils/hardhatConfig.ts create mode 100644 packages/deploy/utils/testUtils.ts diff --git a/packages/deploy/.env.example b/packages/deploy/.env.example new file mode 100644 index 0000000..2c1fc6e --- /dev/null +++ b/packages/deploy/.env.example @@ -0,0 +1,49 @@ +# seed-phrase for the wallet to use on default network and rinkeby_test (personal test network) +# this is required for local testing otherwise hardhat will throw "Invalid mnemonic" +MNEMONIC=xxxxxxxxxxxxxxxxxxxxxx + +# seed-phrase for the wallet to use on mainnet +MNEMONIC_ETHEREUM=xxxxxxxxxxxxxxxxxxxxxx + +# seed-phrase for the wallet to use on rinkeby +MNEMONIC_RINKEBY=xxxxxxxxxxxxxxxxxxxxxx + +# seed-phrase for the wallet to use on goerli +MNEMONIC_GOERLI=xxxxxxxxxxxxxxxxxxxxxx + +# seed-phrase for the wallet to use on mumbai +MNEMONIC_MUMBAI=xxxxxxxxxxxxxxxxxxxxxx + +# mainnet provider URI +ETH_NODE_URI_ETHEREUM=xxxxxxxxxxxxxxxxxxxxxx + +# rinkeby provider URI +ETH_NODE_URI_RINKEBY=xxxxxxxxxxxxxxxxxxxxxx + +# goerli provider URI +ETH_NODE_URI_GOERLI=xxxxxxxxxxxxxxxxxxxxxx + +# goerli provider URI +ETH_NODE_URI_MUMBAI=xxxxxxxxxxxxxxxxxxxxxx + +# provider URI for testnets +ETH_NODE_URI=xxxxxxxxxxxxxxxxxxxxxx + +# polygon provider URI +ETH_NODE_URI_POLYGON=xxxxxxxxxxxxxxxxxxxxxx + +# API key for etherscan verification +ETHERSCAN_API_KEY_ETHEREUM=xxxxxxxxxxxxxxxxxxxxxx +ETHERSCAN_API_KEY_RINKEBY=xxxxxxxxxxxxxxxxxxxxxx +ETHERSCAN_API_KEY_GOERLI=xxxxxxxxxxxxxxxxxxxxxx +ETHERSCAN_API_KEY_POLYGON=xxxxxxxxxxxxxxxxxxxxxx +ETHERSCAN_API_KEY_MUMBAI=xxxxxxxxxxxxxxxxxxxxxx + +# Options to increase Node process memory (useful when running yarn coverage for example on some machine) +NODE_OPTIONS=--max-old-space-size=8192 + +INFURA_HTTP_BLOCK_QUERY_LIMIT=1000 + +# THE GRAPH URL +CLAIMS_GRAPH_URL_MUMBAI=xxxxxxxxxxxxxxxxxxxxxx +CLAIMS_GRAPH_URL_POLYGON=xxxxxxxxxxxxxxxxxxxxxx diff --git a/packages/deploy/.gitignore b/packages/deploy/.gitignore new file mode 100644 index 0000000..f492481 --- /dev/null +++ b/packages/deploy/.gitignore @@ -0,0 +1,10 @@ +cache/ +artifacts/ +node_modules/ +.env +contractsInfo.json +deployments/hardhat +deployments/localhost + +.idea/ +.DS_Store diff --git a/packages/deploy/contracts/.gitkeep b/packages/deploy/contracts/.gitkeep new file mode 100644 index 0000000..cf7ad2f --- /dev/null +++ b/packages/deploy/contracts/.gitkeep @@ -0,0 +1 @@ +this directory is needed by hardhat-dependency-compiler diff --git a/packages/deploy/deploy/01_external/layer2/10_deploy_trusted_forwarder.ts b/packages/deploy/deploy/01_external/layer2/10_deploy_trusted_forwarder.ts new file mode 100644 index 0000000..f21f6dc --- /dev/null +++ b/packages/deploy/deploy/01_external/layer2/10_deploy_trusted_forwarder.ts @@ -0,0 +1,19 @@ +import {HardhatRuntimeEnvironment} from 'hardhat/types'; +import {DeployFunction} from 'hardhat-deploy/types'; +import {isL2, isNotMainnet, unless} from "../../../utils/deploymentSkip"; + +const func: DeployFunction = async function (hre: HardhatRuntimeEnvironment) { + const {getNamedAccounts} = hre; + const {deployer} = await getNamedAccounts(); + const {deployments} = hre; + await deployments.deploy('TRUSTED_FORWARDER', { + contract: 'sandbox-smart-contracts-0.0.30/src/solc_0.8/test/TestMetaTxForwarder.sol:TestMetaTxForwarder', + from: deployer, + log: true, + skipIfAlreadyDeployed: true, + }); +}; + +export default func; +func.tags = ['TRUSTED_FORWARDER', 'L2']; +func.skip = unless(isL2, isNotMainnet); diff --git a/packages/deploy/deploy/01_external/layer2/20_deploy_trusted_forwarder_v2.ts b/packages/deploy/deploy/01_external/layer2/20_deploy_trusted_forwarder_v2.ts new file mode 100644 index 0000000..aef4d14 --- /dev/null +++ b/packages/deploy/deploy/01_external/layer2/20_deploy_trusted_forwarder_v2.ts @@ -0,0 +1,19 @@ +import {HardhatRuntimeEnvironment} from 'hardhat/types'; +import {DeployFunction} from 'hardhat-deploy/types'; +import {isL2, isNotMainnet, unless} from "../../../utils/deploymentSkip"; + +const func: DeployFunction = async function (hre: HardhatRuntimeEnvironment) { + const {getNamedAccounts} = hre; + const {deployer} = await getNamedAccounts(); + const {deployments} = hre; + await deployments.deploy('TRUSTED_FORWARDER_V2', { + contract: 'sandbox-smart-contracts-0.0.30/src/solc_0.8/test/TestMetaTxForwarder.sol:TestMetaTxForwarder', + from: deployer, + log: true, + skipIfAlreadyDeployed: true, + }); +}; + +export default func; +func.tags = ['TRUSTED_FORWARDER_V2', 'L2']; +func.skip = unless(isL2, isNotMainnet); diff --git a/packages/deploy/deploy/01_external/layer2/30_deploy_child_chain_manager.ts b/packages/deploy/deploy/01_external/layer2/30_deploy_child_chain_manager.ts new file mode 100644 index 0000000..9b5b4a7 --- /dev/null +++ b/packages/deploy/deploy/01_external/layer2/30_deploy_child_chain_manager.ts @@ -0,0 +1,19 @@ +import {HardhatRuntimeEnvironment} from 'hardhat/types'; +import {DeployFunction} from 'hardhat-deploy/types'; +import {isL2, isNotMainnet, unless} from "../../../utils/deploymentSkip"; + +const func: DeployFunction = async function (hre: HardhatRuntimeEnvironment) { + const {deployments, getNamedAccounts} = hre; + const {deploy} = deployments; + + const {deployer} = await getNamedAccounts(); + await deploy('CHILD_CHAIN_MANAGER', { + contract: 'sandbox-smart-contracts-0.0.30/src/solc_0.8/test/FakeChildChainManager.sol:FakeChildChainManager', + from: deployer, + log: true, + skipIfAlreadyDeployed: true + }); +}; +export default func; +func.tags = ['CHILD_CHAIN_MANAGER', 'L2']; +func.skip = unless(isL2, isNotMainnet); diff --git a/packages/deploy/deploy/100_develop.ts b/packages/deploy/deploy/100_develop.ts new file mode 100644 index 0000000..6046719 --- /dev/null +++ b/packages/deploy/deploy/100_develop.ts @@ -0,0 +1,17 @@ +import {HardhatRuntimeEnvironment} from 'hardhat/types'; +import {DeployFunction} from 'hardhat-deploy/types'; +import {isNotMainnet, unless} from "../utils/deploymentSkip"; + +const func: DeployFunction = async function (hre: HardhatRuntimeEnvironment) { +}; + +export default func; +func.tags = ["develop"]; +func.skip = unless(isNotMainnet); +func.dependencies = [ + "CHILD_CHAIN_MANAGER", + "Sand", + "PolygonSand", + "SandPermit", // Strange Permit support in a separated contract ? + "SandFaucet" // Sand faucet +] diff --git a/packages/deploy/deploy/100_production.ts b/packages/deploy/deploy/100_production.ts new file mode 100644 index 0000000..e092a1f --- /dev/null +++ b/packages/deploy/deploy/100_production.ts @@ -0,0 +1,15 @@ +/* + Deploy the production environment. + */ +import {HardhatRuntimeEnvironment} from 'hardhat/types'; +import {DeployFunction} from 'hardhat-deploy/types'; + +const func: DeployFunction = async function (hre: HardhatRuntimeEnvironment) { +}; + +export default func; +func.tags = ["production"]; +func.dependencies = [ + "Sand", + "PolygonSand" +] diff --git a/packages/deploy/deploy/10_sand/10_layer1/10_deploy_sand.ts b/packages/deploy/deploy/10_sand/10_layer1/10_deploy_sand.ts new file mode 100644 index 0000000..b25e565 --- /dev/null +++ b/packages/deploy/deploy/10_sand/10_layer1/10_deploy_sand.ts @@ -0,0 +1,23 @@ +import {HardhatRuntimeEnvironment} from 'hardhat/types'; +import {DeployFunction} from 'hardhat-deploy/types'; +import {isL1, unless} from "../../../utils/deploymentSkip"; + +const func: DeployFunction = async function (hre: HardhatRuntimeEnvironment) { + const {deployments, getNamedAccounts} = hre; + const {deploy} = deployments; + + const {sandBeneficiary, deployer} = await getNamedAccounts(); + + await deploy("Sand", { + contract: 'sandbox-smart-contracts-0.0.30/src/solc_0.5/Sand.sol:Sand', + from: deployer, + args: [deployer, deployer, sandBeneficiary], + log: true, + skipIfAlreadyDeployed: true, + }); +}; +export default func; +func.tags = ['Sand', 'Sand_deploy']; +func.skip = unless(isL1); + + diff --git a/packages/deploy/deploy/10_sand/10_layer1/20_deploy_permit.ts b/packages/deploy/deploy/10_sand/10_layer1/20_deploy_permit.ts new file mode 100644 index 0000000..07e5d61 --- /dev/null +++ b/packages/deploy/deploy/10_sand/10_layer1/20_deploy_permit.ts @@ -0,0 +1,24 @@ +import {HardhatRuntimeEnvironment} from 'hardhat/types'; +import {DeployFunction} from 'hardhat-deploy/types'; +import {isL1, unless} from "../../../utils/deploymentSkip"; + +const func: DeployFunction = async function (hre: HardhatRuntimeEnvironment) { + const {deployments, getNamedAccounts} = hre; + const {deploy} = deployments; + + const {deployer} = await getNamedAccounts(); + + const sand = await deployments.get('Sand'); + + await deploy('Permit', { + contract: 'sandbox-smart-contracts-0.0.30/src/solc_0.8/permit/Permit.sol:Permit', + from: deployer, + log: true, + args: [sand.address], + skipIfAlreadyDeployed: true, + }); +}; +export default func; +func.tags = ['SandPermit', 'SandPermit_deploy']; +func.dependencies = ['Sand_deploy']; +func.skip = unless(isL1); diff --git a/packages/deploy/deploy/10_sand/10_layer1/30_set_permit_sand.ts b/packages/deploy/deploy/10_sand/10_layer1/30_set_permit_sand.ts new file mode 100644 index 0000000..bbfa549 --- /dev/null +++ b/packages/deploy/deploy/10_sand/10_layer1/30_set_permit_sand.ts @@ -0,0 +1,35 @@ +import {HardhatRuntimeEnvironment} from 'hardhat/types'; +import {DeployFunction} from 'hardhat-deploy/types'; +import {isL1, unless} from "../../../utils/deploymentSkip"; + +const func: DeployFunction = async function (hre: HardhatRuntimeEnvironment) { + const {deployments} = hre; + const {log, execute, read} = deployments; + + const permit = await deployments.getOrNull('Permit'); + if (!permit) { + return; + } + + const isSandSuperOperator = await read( + 'Sand', + 'isSuperOperator', + permit.address + ); + + if (!isSandSuperOperator) { + log('setting Permit as Super Operator for SAND'); + const currentSandAdmin = await read('Sand', 'getAdmin'); + await execute( + 'Sand', + {from: currentSandAdmin, log: true}, + 'setSuperOperator', + permit.address, + true + ); + } +}; +export default func; +func.tags = ['SandPermit', 'SandPermit_setup']; +func.dependencies = ['Permit_deploy', 'Sand_deploy']; +func.skip = unless(isL1); diff --git a/packages/deploy/deploy/10_sand/10_layer1/40_set_sand_admin.ts b/packages/deploy/deploy/10_sand/10_layer1/40_set_sand_admin.ts new file mode 100644 index 0000000..002041d --- /dev/null +++ b/packages/deploy/deploy/10_sand/10_layer1/40_set_sand_admin.ts @@ -0,0 +1,40 @@ +import {HardhatRuntimeEnvironment} from 'hardhat/types'; +import {DeployFunction} from 'hardhat-deploy/types'; +import {isL1, unless} from "../../../utils/deploymentSkip"; + +const func: DeployFunction = async function (hre: HardhatRuntimeEnvironment) { + const {deployments, ethers, getNamedAccounts} = hre; + const {log, execute, read} = deployments; + + const {sandAdmin, sandExecutionAdmin} = await getNamedAccounts(); + + const currentAdmin = await read('Sand', 'getAdmin'); + if (currentAdmin.toLowerCase() !== sandAdmin.toLowerCase()) { + await execute( + 'Sand', + {from: currentAdmin, log: true}, + 'changeAdmin', + sandAdmin + ); + } + + const sand = await ethers.getContract('Sand'); + // skip for SAND contract without `changeExecutionAdmin` (rinkeby) + const currentExecutionAdmin = await read('Sand', 'getExecutionAdmin'); + if ( + currentExecutionAdmin.toLowerCase() !== sandExecutionAdmin.toLowerCase() + ) { + log('setting Sand Execution Admin'); + await execute( + 'Sand', + {from: currentExecutionAdmin, log: true}, + 'changeExecutionAdmin', + sandExecutionAdmin + ); + } +}; +export default func; +func.runAtTheEnd = true; +func.tags = ['Sand', 'Sand_setup']; +func.dependencies = ['Sand_deploy']; +func.skip = unless(isL1); diff --git a/packages/deploy/deploy/10_sand/10_layer1/50_deploy_faucet.ts b/packages/deploy/deploy/10_sand/10_layer1/50_deploy_faucet.ts new file mode 100644 index 0000000..9f1d53f --- /dev/null +++ b/packages/deploy/deploy/10_sand/10_layer1/50_deploy_faucet.ts @@ -0,0 +1,28 @@ +import {HardhatRuntimeEnvironment} from 'hardhat/types'; +import {DeployFunction} from 'hardhat-deploy/types'; +import {isL1, unless} from "../../../utils/deploymentSkip"; +import {BigNumber} from '@ethersproject/bignumber'; + +const func: DeployFunction = async function (hre: HardhatRuntimeEnvironment) { + const {deployments, getNamedAccounts} = hre; + const {deploy} = deployments; + + const {deployer} = await getNamedAccounts(); + + const sand = await deployments.get('Sand'); + const period = 30; + const DECIMALS_18 = BigNumber.from('1000000000000000000'); + const amountLimit = DECIMALS_18.mul(10); + + await deploy('Faucet', { + contract: "sandbox-smart-contracts-0.0.30/src/solc_0.8/faucet/Faucet.sol:Faucet", + from: deployer, + log: true, + args: [sand.address, period, amountLimit], + skipIfAlreadyDeployed: true, + }); +}; +export default func; +func.tags = ['SandFaucet', 'SandFaucet_deploy']; +func.dependencies = ['Sand_deploy']; +func.skip = unless(isL1); diff --git a/packages/deploy/deploy/10_sand/10_layer2/10_deploy_sand.ts b/packages/deploy/deploy/10_sand/10_layer2/10_deploy_sand.ts new file mode 100644 index 0000000..e0cee3a --- /dev/null +++ b/packages/deploy/deploy/10_sand/10_layer2/10_deploy_sand.ts @@ -0,0 +1,32 @@ +import {HardhatRuntimeEnvironment} from 'hardhat/types'; +import {DeployFunction} from 'hardhat-deploy/types'; +import {isL2, unless} from "../../../utils/deploymentSkip"; + +const func: DeployFunction = async function (hre: HardhatRuntimeEnvironment) { + const {deployments, getNamedAccounts} = hre; + const {deploy} = deployments; + + const {deployer, sandAdmin, sandExecutionAdmin} = await getNamedAccounts(); + + const TRUSTED_FORWARDER_V2 = await deployments.getOrNull( + 'TRUSTED_FORWARDER_V2' + ); + const CHILD_CHAIN_MANAGER = await deployments.get('CHILD_CHAIN_MANAGER'); + await deploy('PolygonSand', { + contract: 'sandbox-smart-contracts-0.0.30/src/solc_0.8/polygon/child/sand/PolygonSand.sol:PolygonSand', + from: deployer, + args: [ + CHILD_CHAIN_MANAGER.address, + TRUSTED_FORWARDER_V2?.address, + sandAdmin, + sandExecutionAdmin, + ], + log: true, + skipIfAlreadyDeployed: true, + }); +}; + +export default func; +func.tags = ['PolygonSand', 'PolygonSand_deploy']; +func.dependencies = ['CHILD_CHAIN_MANAGER', 'TRUSTED_FORWARDER_V2']; +func.skip = unless(isL2); diff --git a/packages/deploy/deploy/10_sand/10_layer2/20_deploy_faucet.ts b/packages/deploy/deploy/10_sand/10_layer2/20_deploy_faucet.ts new file mode 100644 index 0000000..20f7edf --- /dev/null +++ b/packages/deploy/deploy/10_sand/10_layer2/20_deploy_faucet.ts @@ -0,0 +1,28 @@ +import {HardhatRuntimeEnvironment} from 'hardhat/types'; +import {DeployFunction} from 'hardhat-deploy/types'; +import {isL2, unless} from "../../../utils/deploymentSkip"; +import {BigNumber} from '@ethersproject/bignumber'; + +const func: DeployFunction = async function (hre: HardhatRuntimeEnvironment) { + const {deployments, getNamedAccounts} = hre; + const {deploy} = deployments; + + const {deployer} = await getNamedAccounts(); + + const sand = await deployments.get('PolygonSand'); + const period = 30; + const DECIMALS_18 = BigNumber.from('1000000000000000000'); + const amountLimit = DECIMALS_18.mul(10); + + await deploy('PolygonFaucet', { + contract: "sandbox-smart-contracts-0.0.30/src/solc_0.8/faucet/Faucet.sol:Faucet", + from: deployer, + log: true, + args: [sand.address, period, amountLimit], + skipIfAlreadyDeployed: true, + }); +}; +export default func; +func.tags = ['PolygonSandFaucet', 'PolygonSandFaucet_deploy']; +func.dependencies = ['PolygonSand_deploy']; +func.skip = unless(isL2); diff --git a/packages/deploy/deploy/10_sand/10_layer2/30_setup_trusted_forwarder.ts b/packages/deploy/deploy/10_sand/10_layer2/30_setup_trusted_forwarder.ts new file mode 100644 index 0000000..64b7957 --- /dev/null +++ b/packages/deploy/deploy/10_sand/10_layer2/30_setup_trusted_forwarder.ts @@ -0,0 +1,35 @@ +import {HardhatRuntimeEnvironment} from 'hardhat/types'; +import {DeployFunction} from 'hardhat-deploy/types'; +import {isL2, unless} from "../../../utils/deploymentSkip"; + +const func: DeployFunction = async function (hre: HardhatRuntimeEnvironment) { + const {deployments} = hre; + const {read, execute, catchUnknownSigner} = deployments; + const TRUSTED_FORWARDER_V2 = await deployments.getOrNull( + 'TRUSTED_FORWARDER_V2' + ); + if (!TRUSTED_FORWARDER_V2) return; + const isTrustedForwarder = await read( + 'PolygonSand', + 'isTrustedForwarder', + TRUSTED_FORWARDER_V2.address + ); + if (!isTrustedForwarder) { + console.log('Setting TRUSTED_FORWARDER_V2 as trusted forwarder'); + const owner = await read('PolygonSand', 'owner'); + await catchUnknownSigner( + execute( + 'PolygonSand', + {from: owner, log: true}, + 'setTrustedForwarder', + TRUSTED_FORWARDER_V2.address + ) + ); + } +}; + +export default func; +func.tags = ['PolygonSand', 'PolygonSand_setup', 'L2']; +func.dependencies = ['PolygonSand_deploy', 'TRUSTED_FORWARDER_V2']; +func.runAtTheEnd = true; +func.skip = unless(isL2); diff --git a/packages/deploy/deploy/10_sand/10_layer2/40_transfer_admin_and_owner.ts b/packages/deploy/deploy/10_sand/10_layer2/40_transfer_admin_and_owner.ts new file mode 100644 index 0000000..80f1097 --- /dev/null +++ b/packages/deploy/deploy/10_sand/10_layer2/40_transfer_admin_and_owner.ts @@ -0,0 +1,31 @@ +import {DeployFunction} from 'hardhat-deploy/types'; +import {HardhatRuntimeEnvironment} from 'hardhat/types'; +import {isL2, unless} from "../../../utils/deploymentSkip"; + +const func: DeployFunction = async function (hre: HardhatRuntimeEnvironment) { + const {deployments, getNamedAccounts} = hre; + const {sandAdmin} = await getNamedAccounts(); + const {read, execute, catchUnknownSigner} = deployments; + const owner = await read('PolygonSand', 'owner'); + if (owner != sandAdmin) { + await catchUnknownSigner( + execute( + 'PolygonSand', + {from: owner, log: true}, + 'transferOwnership', + sandAdmin + ) + ); + } + const admin = await read('PolygonSand', 'getAdmin'); + if (admin != sandAdmin) { + await catchUnknownSigner( + execute('PolygonSand', {from: admin, log: true}, 'changeAdmin', sandAdmin) + ); + } +}; + +export default func; +func.tags = ['PolygonSand', 'PolygonSand_setup']; +func.dependencies = ['PolygonSand_deploy']; +func.skip = unless(isL2); diff --git a/packages/deploy/deployments/ethereum/.chainId b/packages/deploy/deployments/ethereum/.chainId new file mode 100644 index 0000000..56a6051 --- /dev/null +++ b/packages/deploy/deployments/ethereum/.chainId @@ -0,0 +1 @@ +1 \ No newline at end of file diff --git a/packages/deploy/deployments/ethereum/Sand.json b/packages/deploy/deployments/ethereum/Sand.json new file mode 100644 index 0000000..12d6c12 --- /dev/null +++ b/packages/deploy/deployments/ethereum/Sand.json @@ -0,0 +1,879 @@ +{ + "abi": [ + { + "constant": true, + "inputs": [], + "name": "name", + "outputs": [ + { + "name": "", + "type": "string" + } + ], + "payable": false, + "stateMutability": "view", + "type": "function", + "signature": "0x06fdde03" + }, + { + "constant": false, + "inputs": [ + { + "name": "newAdmin", + "type": "address" + } + ], + "name": "changeExecutionAdmin", + "outputs": [], + "payable": false, + "stateMutability": "nonpayable", + "type": "function", + "signature": "0x0819ba74" + }, + { + "constant": false, + "inputs": [ + { + "name": "spender", + "type": "address" + }, + { + "name": "amount", + "type": "uint256" + } + ], + "name": "approve", + "outputs": [ + { + "name": "success", + "type": "bool" + } + ], + "payable": false, + "stateMutability": "nonpayable", + "type": "function", + "signature": "0x095ea7b3" + }, + { + "constant": true, + "inputs": [], + "name": "totalSupply", + "outputs": [ + { + "name": "", + "type": "uint256" + } + ], + "payable": false, + "stateMutability": "view", + "type": "function", + "signature": "0x18160ddd" + }, + { + "constant": false, + "inputs": [ + { + "name": "owner", + "type": "address" + }, + { + "name": "amount", + "type": "uint256" + } + ], + "name": "burnFor", + "outputs": [ + { + "name": "", + "type": "bool" + } + ], + "payable": false, + "stateMutability": "nonpayable", + "type": "function", + "signature": "0x1dd319cb" + }, + { + "constant": false, + "inputs": [ + { + "name": "from", + "type": "address" + }, + { + "name": "to", + "type": "address" + }, + { + "name": "amount", + "type": "uint256" + } + ], + "name": "transferFrom", + "outputs": [ + { + "name": "success", + "type": "bool" + } + ], + "payable": false, + "stateMutability": "nonpayable", + "type": "function", + "signature": "0x23b872dd" + }, + { + "constant": false, + "inputs": [ + { + "name": "owner", + "type": "address" + }, + { + "name": "spender", + "type": "address" + }, + { + "name": "amount", + "type": "uint256" + } + ], + "name": "approveFor", + "outputs": [ + { + "name": "success", + "type": "bool" + } + ], + "payable": false, + "stateMutability": "nonpayable", + "type": "function", + "signature": "0x2b991746" + }, + { + "constant": true, + "inputs": [], + "name": "decimals", + "outputs": [ + { + "name": "", + "type": "uint8" + } + ], + "payable": false, + "stateMutability": "view", + "type": "function", + "signature": "0x313ce567" + }, + { + "constant": false, + "inputs": [ + { + "name": "owner", + "type": "address" + }, + { + "name": "spender", + "type": "address" + }, + { + "name": "amountNeeded", + "type": "uint256" + } + ], + "name": "addAllowanceIfNeeded", + "outputs": [ + { + "name": "success", + "type": "bool" + } + ], + "payable": false, + "stateMutability": "nonpayable", + "type": "function", + "signature": "0x3b7b5a16" + }, + { + "constant": false, + "inputs": [ + { + "name": "amount", + "type": "uint256" + } + ], + "name": "burn", + "outputs": [ + { + "name": "", + "type": "bool" + } + ], + "payable": false, + "stateMutability": "nonpayable", + "type": "function", + "signature": "0x42966c68" + }, + { + "constant": true, + "inputs": [ + { + "name": "who", + "type": "address" + } + ], + "name": "isExecutionOperator", + "outputs": [ + { + "name": "", + "type": "bool" + } + ], + "payable": false, + "stateMutability": "view", + "type": "function", + "signature": "0x61247de3" + }, + { + "constant": true, + "inputs": [ + { + "name": "who", + "type": "address" + } + ], + "name": "isSuperOperator", + "outputs": [ + { + "name": "", + "type": "bool" + } + ], + "payable": false, + "stateMutability": "view", + "type": "function", + "signature": "0x654b748a" + }, + { + "constant": false, + "inputs": [ + { + "name": "executionOperator", + "type": "address" + }, + { + "name": "enabled", + "type": "bool" + } + ], + "name": "setExecutionOperator", + "outputs": [], + "payable": false, + "stateMutability": "nonpayable", + "type": "function", + "signature": "0x699c834b" + }, + { + "constant": true, + "inputs": [], + "name": "getAdmin", + "outputs": [ + { + "name": "", + "type": "address" + } + ], + "payable": false, + "stateMutability": "view", + "type": "function", + "signature": "0x6e9960c3" + }, + { + "constant": true, + "inputs": [ + { + "name": "owner", + "type": "address" + } + ], + "name": "balanceOf", + "outputs": [ + { + "name": "", + "type": "uint256" + } + ], + "payable": false, + "stateMutability": "view", + "type": "function", + "signature": "0x70a08231" + }, + { + "constant": false, + "inputs": [ + { + "name": "from", + "type": "address" + }, + { + "name": "to", + "type": "address" + }, + { + "name": "amount", + "type": "uint256" + }, + { + "name": "gasLimit", + "type": "uint256" + }, + { + "name": "data", + "type": "bytes" + } + ], + "name": "approveAndExecuteWithSpecificGas", + "outputs": [ + { + "name": "success", + "type": "bool" + }, + { + "name": "returnData", + "type": "bytes" + } + ], + "payable": false, + "stateMutability": "nonpayable", + "type": "function", + "signature": "0x7dd711c4" + }, + { + "constant": false, + "inputs": [ + { + "name": "newAdmin", + "type": "address" + } + ], + "name": "changeAdmin", + "outputs": [], + "payable": false, + "stateMutability": "nonpayable", + "type": "function", + "signature": "0x8f283970" + }, + { + "constant": true, + "inputs": [], + "name": "symbol", + "outputs": [ + { + "name": "", + "type": "string" + } + ], + "payable": false, + "stateMutability": "view", + "type": "function", + "signature": "0x95d89b41" + }, + { + "constant": false, + "inputs": [ + { + "name": "to", + "type": "address" + }, + { + "name": "amount", + "type": "uint256" + } + ], + "name": "transfer", + "outputs": [ + { + "name": "success", + "type": "bool" + } + ], + "payable": false, + "stateMutability": "nonpayable", + "type": "function", + "signature": "0xa9059cbb" + }, + { + "constant": false, + "inputs": [ + { + "name": "superOperator", + "type": "address" + }, + { + "name": "enabled", + "type": "bool" + } + ], + "name": "setSuperOperator", + "outputs": [], + "payable": false, + "stateMutability": "nonpayable", + "type": "function", + "signature": "0xac9fe421" + }, + { + "constant": true, + "inputs": [], + "name": "getExecutionAdmin", + "outputs": [ + { + "name": "", + "type": "address" + } + ], + "payable": false, + "stateMutability": "view", + "type": "function", + "signature": "0xb01b0ef7" + }, + { + "constant": false, + "inputs": [ + { + "name": "target", + "type": "address" + }, + { + "name": "amount", + "type": "uint256" + }, + { + "name": "data", + "type": "bytes" + } + ], + "name": "paidCall", + "outputs": [ + { + "name": "", + "type": "bytes" + } + ], + "payable": true, + "stateMutability": "payable", + "type": "function", + "signature": "0xbb1e23cb" + }, + { + "constant": false, + "inputs": [ + { + "name": "target", + "type": "address" + }, + { + "name": "amount", + "type": "uint256" + }, + { + "name": "data", + "type": "bytes" + } + ], + "name": "approveAndCall", + "outputs": [ + { + "name": "", + "type": "bytes" + } + ], + "payable": true, + "stateMutability": "payable", + "type": "function", + "signature": "0xcae9ca51" + }, + { + "constant": false, + "inputs": [ + { + "name": "from", + "type": "address" + }, + { + "name": "to", + "type": "address" + }, + { + "name": "amount", + "type": "uint256" + }, + { + "name": "gasLimit", + "type": "uint256" + }, + { + "name": "tokenGasPrice", + "type": "uint256" + }, + { + "name": "baseGasCharge", + "type": "uint256" + }, + { + "name": "tokenReceiver", + "type": "address" + }, + { + "name": "data", + "type": "bytes" + } + ], + "name": "approveAndExecuteWithSpecificGasAndChargeForIt", + "outputs": [ + { + "name": "success", + "type": "bool" + }, + { + "name": "returnData", + "type": "bytes" + } + ], + "payable": false, + "stateMutability": "nonpayable", + "type": "function", + "signature": "0xdc2173f3" + }, + { + "constant": false, + "inputs": [ + { + "name": "to", + "type": "address" + }, + { + "name": "gasLimit", + "type": "uint256" + }, + { + "name": "data", + "type": "bytes" + } + ], + "name": "executeWithSpecificGas", + "outputs": [ + { + "name": "success", + "type": "bool" + }, + { + "name": "returnData", + "type": "bytes" + } + ], + "payable": false, + "stateMutability": "nonpayable", + "type": "function", + "signature": "0xdcdf5158" + }, + { + "constant": true, + "inputs": [ + { + "name": "owner", + "type": "address" + }, + { + "name": "spender", + "type": "address" + } + ], + "name": "allowance", + "outputs": [ + { + "name": "remaining", + "type": "uint256" + } + ], + "payable": false, + "stateMutability": "view", + "type": "function", + "signature": "0xdd62ed3e" + }, + { + "constant": false, + "inputs": [ + { + "name": "from", + "type": "address" + }, + { + "name": "to", + "type": "address" + }, + { + "name": "amount", + "type": "uint256" + }, + { + "name": "gasLimit", + "type": "uint256" + }, + { + "name": "tokenGasPrice", + "type": "uint256" + }, + { + "name": "baseGasCharge", + "type": "uint256" + }, + { + "name": "tokenReceiver", + "type": "address" + } + ], + "name": "transferAndChargeForGas", + "outputs": [ + { + "name": "", + "type": "bool" + } + ], + "payable": false, + "stateMutability": "nonpayable", + "type": "function", + "signature": "0xe18aa335" + }, + { + "inputs": [ + { + "name": "sandAdmin", + "type": "address" + }, + { + "name": "executionAdmin", + "type": "address" + }, + { + "name": "beneficiary", + "type": "address" + } + ], + "payable": false, + "stateMutability": "nonpayable", + "type": "constructor", + "signature": "constructor" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "name": "from", + "type": "address" + }, + { + "indexed": true, + "name": "to", + "type": "address" + }, + { + "indexed": false, + "name": "value", + "type": "uint256" + } + ], + "name": "Transfer", + "type": "event", + "signature": "0xddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "name": "owner", + "type": "address" + }, + { + "indexed": true, + "name": "spender", + "type": "address" + }, + { + "indexed": false, + "name": "value", + "type": "uint256" + } + ], + "name": "Approval", + "type": "event", + "signature": "0x8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "name": "superOperator", + "type": "address" + }, + { + "indexed": false, + "name": "enabled", + "type": "bool" + } + ], + "name": "SuperOperator", + "type": "event", + "signature": "0x44f92d27abdf4cfb6a7d712c3af68f3be086d4ca747ab802c36f67d6790060d8" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "name": "oldAdmin", + "type": "address" + }, + { + "indexed": false, + "name": "newAdmin", + "type": "address" + } + ], + "name": "AdminChanged", + "type": "event", + "signature": "0x7e644d79422f17c01e4894b5f4f588d331ebfa28653d42ae832dc59e38c9798f" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "name": "oldAdmin", + "type": "address" + }, + { + "indexed": false, + "name": "newAdmin", + "type": "address" + } + ], + "name": "ExecutionAdminAdminChanged", + "type": "event", + "signature": "0xb2b670b34860515166c00eba5e2e5fa8116d57091604f37ba24ac8021c7fa165" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "name": "executionOperator", + "type": "address" + }, + { + "indexed": false, + "name": "enabled", + "type": "bool" + } + ], + "name": "ExecutionOperator", + "type": "event", + "signature": "0xfcebaa973ed84808fb785c92941aa4798f3f66923f5a2ff544382db3a9b3a3a2" + } + ], + "address": "0x3845badAde8e6dFF049820680d1F14bD3903a5d0", + "receipt": { + "transactionHash": "0x43feed4eb9d067a4fa2951c08c04e894cef9b126dbab39f6d7b1f3a3d93a5a63", + "blockNumber": 8835135 + }, + "args": [ + "0x18dd4e0eb8699eA4FeE238dE41ECfb95e32272f8", + "0x18dd4e0eb8699eA4FeE238dE41ECfb95e32272f8", + "0xeaa0993e1d21c2103e4f172a20d29371fbaf6d06" + ], + "bytecode": "0x608060405234801561001057600080fd5b5060405162001ed638038062001ed68339818101604052606081101561003557600080fd5b5080516020820151604090920151600280546001600160a01b038085166001600160a01b0319928316179092556000805492861692909116919091179055909190610095816b09b18ab5df7180b6b80000006001600160e01b0361009d16565b505050610253565b6001600160a01b03821661011257604080517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601260248201527f43616e6e6f74206d696e7420746f203078300000000000000000000000000000604482015290519081900360640190fd5b6000811161018157604080517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601460248201527f63616e6e6f74206d696e74203020746f6b656e73000000000000000000000000604482015290519081900360640190fd5b6004548181018181116101f557604080517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152600860248201527f6f766572666c6f77000000000000000000000000000000000000000000000000604482015290519081900360640190fd5b60048190556001600160a01b0384166000818152600560209081526040808320805488019055805187815290517fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef929181900390910190a350505050565b611c7380620002636000396000f3fe6080604052600436106101ac5760003560e01c80636e9960c3116100ec578063b01b0ef71161008a578063dc2173f311610064578063dc2173f31461082b578063dcdf5158146108e2578063dd62ed3e14610974578063e18aa335146109af576101ac565b8063b01b0ef71461070c578063bb1e23cb14610721578063cae9ca51146107a6576101ac565b80638f283970116100c65780638f2839701461066557806395d89b41146101b1578063a9059cbb14610698578063ac9fe421146106d1576101ac565b80636e9960c3146104dc57806370a082311461050d5780637dd711c414610540576101ac565b80632b9917461161015957806342966c681161013357806342966c681461041157806361247de31461043b578063654b748a1461046e578063699c834b146104a1576101ac565b80632b99174614610360578063313ce567146103a35780633b7b5a16146103ce576101ac565b806318160ddd1161018a57806318160ddd146102bd5780631dd319cb146102e457806323b872dd1461031d576101ac565b806306fdde03146101b15780630819ba741461023b578063095ea7b314610270575b600080fd5b3480156101bd57600080fd5b506101c6610a0c565b6040805160208082528351818301528351919283929083019185019080838360005b838110156102005781810151838201526020016101e8565b50505050905090810190601f16801561022d5780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b34801561024757600080fd5b5061026e6004803603602081101561025e57600080fd5b50356001600160a01b0316610a43565b005b34801561027c57600080fd5b506102a96004803603604081101561029357600080fd5b506001600160a01b038135169060200135610b0e565b604080519115158252519081900360200190f35b3480156102c957600080fd5b506102d2610b25565b60408051918252519081900360200190f35b3480156102f057600080fd5b506102a96004803603604081101561030757600080fd5b506001600160a01b038135169060200135610b2b565b34801561032957600080fd5b506102a96004803603606081101561034057600080fd5b506001600160a01b03813581169160208101359091169060400135610b37565b34801561036c57600080fd5b506102a96004803603606081101561038357600080fd5b506001600160a01b03813581169160208101359091169060400135610c29565b3480156103af57600080fd5b506103b8610c97565b6040805160ff9092168252519081900360200190f35b3480156103da57600080fd5b506102a9600480360360608110156103f157600080fd5b506001600160a01b03813581169160208101359091169060400135610c9c565b34801561041d57600080fd5b506102a96004803603602081101561043457600080fd5b5035610d0a565b34801561044757600080fd5b506102a96004803603602081101561045e57600080fd5b50356001600160a01b0316610d1e565b34801561047a57600080fd5b506102a96004803603602081101561049157600080fd5b50356001600160a01b0316610d3c565b3480156104ad57600080fd5b5061026e600480360360408110156104c457600080fd5b506001600160a01b0381351690602001351515610d5a565b3480156104e857600080fd5b506104f1610e07565b604080516001600160a01b039092168252519081900360200190f35b34801561051957600080fd5b506102d26004803603602081101561053057600080fd5b50356001600160a01b0316610e16565b34801561054c57600080fd5b506105e2600480360360a081101561056357600080fd5b6001600160a01b03823581169260208101359091169160408201359160608101359181019060a0810160808201356401000000008111156105a357600080fd5b8201836020820111156105b557600080fd5b803590602001918460018302840111640100000000831117156105d757600080fd5b509092509050610e31565b604051808315151515815260200180602001828103825283818151815260200191508051906020019080838360005b83811015610629578181015183820152602001610611565b50505050905090810190601f1680156106565780820380516001836020036101000a031916815260200191505b50935050505060405180910390f35b34801561067157600080fd5b5061026e6004803603602081101561068857600080fd5b50356001600160a01b0316610ed4565b3480156106a457600080fd5b506102a9600480360360408110156106bb57600080fd5b506001600160a01b038135169060200135610fb5565b3480156106dd57600080fd5b5061026e600480360360408110156106f457600080fd5b506001600160a01b0381351690602001351515610fc2565b34801561071857600080fd5b506104f161106f565b6101c66004803603606081101561073757600080fd5b6001600160a01b038235169160208101359181019060608101604082013564010000000081111561076757600080fd5b82018360208201111561077957600080fd5b8035906020019184600183028401116401000000008311171561079b57600080fd5b50909250905061107e565b6101c6600480360360608110156107bc57600080fd5b6001600160a01b03823516916020810135918101906060810160408201356401000000008111156107ec57600080fd5b8201836020820111156107fe57600080fd5b8035906020019184600183028401116401000000008311171561082057600080fd5b509092509050611225565b34801561083757600080fd5b506105e2600480360361010081101561084f57600080fd5b6001600160a01b038235811692602081013582169260408201359260608301359260808101359260a08201359260c0830135169190810190610100810160e08201356401000000008111156108a357600080fd5b8201836020820111156108b557600080fd5b803590602001918460018302840111640100000000831117156108d757600080fd5b5090925090506112c4565b3480156108ee57600080fd5b506105e26004803603606081101561090557600080fd5b6001600160a01b038235169160208101359181019060608101604082013564010000000081111561093557600080fd5b82018360208201111561094757600080fd5b8035906020019184600183028401116401000000008311171561096957600080fd5b509092509050611387565b34801561098057600080fd5b506102d26004803603604081101561099757600080fd5b506001600160a01b0381358116916020013516611456565b3480156109bb57600080fd5b506102a9600480360360e08110156109d257600080fd5b506001600160a01b038135811691602081013582169160408201359160608101359160808201359160a08101359160c09091013516611481565b60408051808201909152600481527f53414e4400000000000000000000000000000000000000000000000000000000602082015290565b6000546001600160a01b03163314610a8c5760405162461bcd60e51b815260040180806020018281038252602d815260200180611bd8602d913960400191505060405180910390fd5b600054604080516001600160a01b039283168152918316602083015280517fb2b670b34860515166c00eba5e2e5fa8116d57091604f37ba24ac8021c7fa1659281900390910190a1600080547fffffffffffffffffffffffff0000000000000000000000000000000000000000166001600160a01b0392909216919091179055565b6000610b1b338484611504565b5060015b92915050565b60045490565b6000610b1b83836115d7565b6000336001600160a01b03851614801590610b6257503360009081526003602052604090205460ff16155b15610c14576001600160a01b03841660009081526006602090815260408083203384529091529020546000198114610c125782811015610be9576040805162461bcd60e51b815260206004820152601860248201527f4e6f7420656e6f7567682066756e647320616c6c6f7765640000000000000000604482015290519081900360640190fd5b6001600160a01b0385166000908152600660209081526040808320338452909152902083820390555b505b610c1f8484846117d8565b5060019392505050565b6000336001600160a01b0385161480610c5157503360009081526003602052604090205460ff165b610c8c5760405162461bcd60e51b8152600401808060200182810382526025815260200180611b0e6025913960400191505060405180910390fd5b610c1f848484611504565b601290565b6000336001600160a01b0385161480610cc457503360009081526003602052604090205460ff165b610cff5760405162461bcd60e51b8152600401808060200182810382526025815260200180611b0e6025913960400191505060405180910390fd5b610c1f84848461190c565b6000610d1633836115d7565b506001919050565b6001600160a01b031660009081526001602052604090205460ff1690565b6001600160a01b031660009081526003602052604090205460ff1690565b6000546001600160a01b03163314610da35760405162461bcd60e51b815260040180806020018281038252603a815260200180611b72603a913960400191505060405180910390fd5b6001600160a01b038216600081815260016020908152604091829020805460ff191685151590811790915582519384529083015280517ffcebaa973ed84808fb785c92941aa4798f3f66923f5a2ff544382db3a9b3a3a29281900390910190a15050565b6002546001600160a01b031690565b6001600160a01b031660009081526005602052604090205490565b3360009081526001602052604081205460609060ff16610e825760405162461bcd60e51b815260040180806020018281038252603a815260200180611c05603a913960400191505060405180910390fd5b610ec58888888888888080601f01602080910402602001604051908101604052809392919081815260200183838082843760009201919091525061196792505050565b91509150965096945050505050565b6002546001600160a01b03163314610f33576040805162461bcd60e51b815260206004820152601b60248201527f6f6e6c792061646d696e2063616e206368616e67652061646d696e0000000000604482015290519081900360640190fd5b600254604080516001600160a01b039283168152918316602083015280517f7e644d79422f17c01e4894b5f4f588d331ebfa28653d42ae832dc59e38c9798f9281900390910190a1600280547fffffffffffffffffffffffff0000000000000000000000000000000000000000166001600160a01b0392909216919091179055565b6000610b1b3384846117d8565b6002546001600160a01b0316331461100b5760405162461bcd60e51b815260040180806020018281038252602c815260200180611bac602c913960400191505060405180910390fd5b6001600160a01b038216600081815260036020908152604091829020805460ff191685151590811790915582519384529083015280517f44f92d27abdf4cfb6a7d712c3af68f3be086d4ca747ab802c36f67d6790060d89281900390910190a15050565b6000546001600160a01b031690565b60606110c183838080601f016020809104026020016040519081016040528093929190818152602001838380828437600092019190915250339250611a59915050565b611112576040805162461bcd60e51b815260206004820152601560248201527f666972737420706172616d20213d2073656e6465720000000000000000000000604482015290519081900360640190fd5b83156111235761112333868661190c565b60006060866001600160a01b0316348686604051808383808284376040519201945060009350909150508083038185875af1925050503d8060008114611185576040519150601f19603f3d011682016040523d82523d6000602084013e61118a565b606091505b509150915081819061121a5760405162461bcd60e51b81526004018080602001828103825283818151815260200191508051906020019080838360005b838110156111df5781810151838201526020016111c7565b50505050905090810190601f16801561120c5780820380516001836020036101000a031916815260200191505b509250505060405180910390fd5b509695505050505050565b606061126883838080601f016020809104026020016040519081016040528093929190818152602001838380828437600092019190915250339250611a59915050565b6112b9576040805162461bcd60e51b815260206004820152601560248201527f666972737420706172616d20213d2073656e6465720000000000000000000000604482015290519081900360640190fd5b611123338686611504565b6000606060005a3360009081526001602052604090205490915060ff1661131c5760405162461bcd60e51b815260040180806020018281038252603a815260200180611c05603a913960400191505060405180910390fd5b61135f8c8c8c8c89898080601f01602080910402602001604051908101604052809392919081815260200183838082843760009201919091525061196792505050565b90935091508715611378576113788c8a8a848b8b611a84565b50995099975050505050505050565b3360009081526001602052604081205460609060ff166113d85760405162461bcd60e51b815260040180806020018281038252603a815260200180611c05603a913960400191505060405180910390fd5b856001600160a01b03168585856040518083838082843760405192019450600093509091505080830381838787f1925050503d8060008114611436576040519150601f19603f3d011682016040523d82523d6000602084013e61143b565b606091505b509092509050603f85045a1161144d57fe5b94509492505050565b6001600160a01b03918216600090815260066020908152604080832093909416825291909152205490565b6000805a3360009081526001602052604090205490915060ff166114d65760405162461bcd60e51b815260040180806020018281038252603f815260200180611b33603f913960400191505060405180910390fd5b6114e18989896117d8565b84156114f5576114f5898787848888611a84565b50600198975050505050505050565b6001600160a01b0383161580159061152457506001600160a01b03821615155b611575576040805162461bcd60e51b815260206004820152601760248201527f43616e6e6f7420617070726f7665207769746820307830000000000000000000604482015290519081900360640190fd5b6001600160a01b03808416600081815260066020908152604080832094871680845294825291829020859055815185815291517f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b9259281900390910190a3505050565b6000811161162c576040805162461bcd60e51b815260206004820152601460248201527f63616e6e6f74206275726e203020746f6b656e73000000000000000000000000604482015290519081900360640190fd5b336001600160a01b0383161480159061165557503360009081526003602052604090205460ff16155b15611707576001600160a01b0382166000908152600660209081526040808320338452909152902054818110156116d3576040805162461bcd60e51b815260206004820152601860248201527f4e6f7420656e6f7567682066756e647320616c6c6f7765640000000000000000604482015290519081900360640190fd5b8060001914611705576001600160a01b0383166000908152600660209081526040808320338452909152902082820390555b505b6001600160a01b03821660009081526005602052604090205481811015611775576040805162461bcd60e51b815260206004820152601060248201527f4e6f7420656e6f7567682066756e647300000000000000000000000000000000604482015290519081900360640190fd5b6001600160a01b03831660008181526005602090815260408083208686039055600480548790039055805186815290519293927fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef929181900390910190a3505050565b6001600160a01b038216611833576040805162461bcd60e51b815260206004820152601260248201527f43616e6e6f742073656e6420746f203078300000000000000000000000000000604482015290519081900360640190fd5b6001600160a01b038316600090815260056020526040902054818110156118a1576040805162461bcd60e51b815260206004820152600f60248201527f6e6f7420656e6f7567682066756e640000000000000000000000000000000000604482015290519081900360640190fd5b6001600160a01b0380851660008181526005602090815260408083208787039055938716808352918490208054870190558351868152935191937fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef929081900390910190a350505050565b600081118015611922575061192082610d3c565b155b15611962576001600160a01b038084166000908152600660209081526040808320938616835292905220548181101561196057611960848484611504565b505b505050565b60006060841561197c5761197c87878761190c565b856001600160a01b031684846040518082805190602001908083835b602083106119d557805182527fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe09092019160209182019101611998565b6001836020036101000a03801982511681845116808217855250505050505090500191505060006040518083038160008787f1925050503d8060008114611a38576040519150601f19603f3d011682016040523d82523d6000602084013e611a3d565b606091505b509092509050603f84045a11611a4f57fe5b9550959350505050565b6000604483511015611a6d57506000610b1f565b5060248201516001600160a01b0382161492915050565b60005a8403905085811115611a965750845b820184810285828281611aa557fe5b0414611af8576040805162461bcd60e51b815260206004820152600860248201527f6f766572666c6f77000000000000000000000000000000000000000000000000604482015290519081900360640190fd5b611b038884836117d8565b505050505050505056fe6d73672e73656e64657220213d206f776e6572202626202173757065724f70657261746f726f6e6c7920657865637574696f6e206f70657261746f727320616c6c6f77656420746f2070657266726f6d207472616e7366657220616e64206368617267656f6e6c7920657865637574696f6e2061646d696e20697320616c6c6f77656420746f2061646420657865637574696f6e206f70657261746f72736f6e6c792061646d696e20697320616c6c6f77656420746f20616464207375706572206f70657261746f72736f6e6c7920657865637574696f6e41646d696e2063616e206368616e676520657865637574696f6e41646d696e6f6e6c7920657865637574696f6e206f70657261746f727320616c6c6f77656420746f2065786563757465206f6e2053414e4420626568616c66a265627a7a72305820c7a438998ba2dc88fc9df905ee2425cd3898a4efc17aeb7ccfef84f57510980864736f6c63430005090032", + "deployedBytecode": "0x6080604052600436106101ac5760003560e01c80636e9960c3116100ec578063b01b0ef71161008a578063dc2173f311610064578063dc2173f31461082b578063dcdf5158146108e2578063dd62ed3e14610974578063e18aa335146109af576101ac565b8063b01b0ef71461070c578063bb1e23cb14610721578063cae9ca51146107a6576101ac565b80638f283970116100c65780638f2839701461066557806395d89b41146101b1578063a9059cbb14610698578063ac9fe421146106d1576101ac565b80636e9960c3146104dc57806370a082311461050d5780637dd711c414610540576101ac565b80632b9917461161015957806342966c681161013357806342966c681461041157806361247de31461043b578063654b748a1461046e578063699c834b146104a1576101ac565b80632b99174614610360578063313ce567146103a35780633b7b5a16146103ce576101ac565b806318160ddd1161018a57806318160ddd146102bd5780631dd319cb146102e457806323b872dd1461031d576101ac565b806306fdde03146101b15780630819ba741461023b578063095ea7b314610270575b600080fd5b3480156101bd57600080fd5b506101c6610a0c565b6040805160208082528351818301528351919283929083019185019080838360005b838110156102005781810151838201526020016101e8565b50505050905090810190601f16801561022d5780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b34801561024757600080fd5b5061026e6004803603602081101561025e57600080fd5b50356001600160a01b0316610a43565b005b34801561027c57600080fd5b506102a96004803603604081101561029357600080fd5b506001600160a01b038135169060200135610b0e565b604080519115158252519081900360200190f35b3480156102c957600080fd5b506102d2610b25565b60408051918252519081900360200190f35b3480156102f057600080fd5b506102a96004803603604081101561030757600080fd5b506001600160a01b038135169060200135610b2b565b34801561032957600080fd5b506102a96004803603606081101561034057600080fd5b506001600160a01b03813581169160208101359091169060400135610b37565b34801561036c57600080fd5b506102a96004803603606081101561038357600080fd5b506001600160a01b03813581169160208101359091169060400135610c29565b3480156103af57600080fd5b506103b8610c97565b6040805160ff9092168252519081900360200190f35b3480156103da57600080fd5b506102a9600480360360608110156103f157600080fd5b506001600160a01b03813581169160208101359091169060400135610c9c565b34801561041d57600080fd5b506102a96004803603602081101561043457600080fd5b5035610d0a565b34801561044757600080fd5b506102a96004803603602081101561045e57600080fd5b50356001600160a01b0316610d1e565b34801561047a57600080fd5b506102a96004803603602081101561049157600080fd5b50356001600160a01b0316610d3c565b3480156104ad57600080fd5b5061026e600480360360408110156104c457600080fd5b506001600160a01b0381351690602001351515610d5a565b3480156104e857600080fd5b506104f1610e07565b604080516001600160a01b039092168252519081900360200190f35b34801561051957600080fd5b506102d26004803603602081101561053057600080fd5b50356001600160a01b0316610e16565b34801561054c57600080fd5b506105e2600480360360a081101561056357600080fd5b6001600160a01b03823581169260208101359091169160408201359160608101359181019060a0810160808201356401000000008111156105a357600080fd5b8201836020820111156105b557600080fd5b803590602001918460018302840111640100000000831117156105d757600080fd5b509092509050610e31565b604051808315151515815260200180602001828103825283818151815260200191508051906020019080838360005b83811015610629578181015183820152602001610611565b50505050905090810190601f1680156106565780820380516001836020036101000a031916815260200191505b50935050505060405180910390f35b34801561067157600080fd5b5061026e6004803603602081101561068857600080fd5b50356001600160a01b0316610ed4565b3480156106a457600080fd5b506102a9600480360360408110156106bb57600080fd5b506001600160a01b038135169060200135610fb5565b3480156106dd57600080fd5b5061026e600480360360408110156106f457600080fd5b506001600160a01b0381351690602001351515610fc2565b34801561071857600080fd5b506104f161106f565b6101c66004803603606081101561073757600080fd5b6001600160a01b038235169160208101359181019060608101604082013564010000000081111561076757600080fd5b82018360208201111561077957600080fd5b8035906020019184600183028401116401000000008311171561079b57600080fd5b50909250905061107e565b6101c6600480360360608110156107bc57600080fd5b6001600160a01b03823516916020810135918101906060810160408201356401000000008111156107ec57600080fd5b8201836020820111156107fe57600080fd5b8035906020019184600183028401116401000000008311171561082057600080fd5b509092509050611225565b34801561083757600080fd5b506105e2600480360361010081101561084f57600080fd5b6001600160a01b038235811692602081013582169260408201359260608301359260808101359260a08201359260c0830135169190810190610100810160e08201356401000000008111156108a357600080fd5b8201836020820111156108b557600080fd5b803590602001918460018302840111640100000000831117156108d757600080fd5b5090925090506112c4565b3480156108ee57600080fd5b506105e26004803603606081101561090557600080fd5b6001600160a01b038235169160208101359181019060608101604082013564010000000081111561093557600080fd5b82018360208201111561094757600080fd5b8035906020019184600183028401116401000000008311171561096957600080fd5b509092509050611387565b34801561098057600080fd5b506102d26004803603604081101561099757600080fd5b506001600160a01b0381358116916020013516611456565b3480156109bb57600080fd5b506102a9600480360360e08110156109d257600080fd5b506001600160a01b038135811691602081013582169160408201359160608101359160808201359160a08101359160c09091013516611481565b60408051808201909152600481527f53414e4400000000000000000000000000000000000000000000000000000000602082015290565b6000546001600160a01b03163314610a8c5760405162461bcd60e51b815260040180806020018281038252602d815260200180611bd8602d913960400191505060405180910390fd5b600054604080516001600160a01b039283168152918316602083015280517fb2b670b34860515166c00eba5e2e5fa8116d57091604f37ba24ac8021c7fa1659281900390910190a1600080547fffffffffffffffffffffffff0000000000000000000000000000000000000000166001600160a01b0392909216919091179055565b6000610b1b338484611504565b5060015b92915050565b60045490565b6000610b1b83836115d7565b6000336001600160a01b03851614801590610b6257503360009081526003602052604090205460ff16155b15610c14576001600160a01b03841660009081526006602090815260408083203384529091529020546000198114610c125782811015610be9576040805162461bcd60e51b815260206004820152601860248201527f4e6f7420656e6f7567682066756e647320616c6c6f7765640000000000000000604482015290519081900360640190fd5b6001600160a01b0385166000908152600660209081526040808320338452909152902083820390555b505b610c1f8484846117d8565b5060019392505050565b6000336001600160a01b0385161480610c5157503360009081526003602052604090205460ff165b610c8c5760405162461bcd60e51b8152600401808060200182810382526025815260200180611b0e6025913960400191505060405180910390fd5b610c1f848484611504565b601290565b6000336001600160a01b0385161480610cc457503360009081526003602052604090205460ff165b610cff5760405162461bcd60e51b8152600401808060200182810382526025815260200180611b0e6025913960400191505060405180910390fd5b610c1f84848461190c565b6000610d1633836115d7565b506001919050565b6001600160a01b031660009081526001602052604090205460ff1690565b6001600160a01b031660009081526003602052604090205460ff1690565b6000546001600160a01b03163314610da35760405162461bcd60e51b815260040180806020018281038252603a815260200180611b72603a913960400191505060405180910390fd5b6001600160a01b038216600081815260016020908152604091829020805460ff191685151590811790915582519384529083015280517ffcebaa973ed84808fb785c92941aa4798f3f66923f5a2ff544382db3a9b3a3a29281900390910190a15050565b6002546001600160a01b031690565b6001600160a01b031660009081526005602052604090205490565b3360009081526001602052604081205460609060ff16610e825760405162461bcd60e51b815260040180806020018281038252603a815260200180611c05603a913960400191505060405180910390fd5b610ec58888888888888080601f01602080910402602001604051908101604052809392919081815260200183838082843760009201919091525061196792505050565b91509150965096945050505050565b6002546001600160a01b03163314610f33576040805162461bcd60e51b815260206004820152601b60248201527f6f6e6c792061646d696e2063616e206368616e67652061646d696e0000000000604482015290519081900360640190fd5b600254604080516001600160a01b039283168152918316602083015280517f7e644d79422f17c01e4894b5f4f588d331ebfa28653d42ae832dc59e38c9798f9281900390910190a1600280547fffffffffffffffffffffffff0000000000000000000000000000000000000000166001600160a01b0392909216919091179055565b6000610b1b3384846117d8565b6002546001600160a01b0316331461100b5760405162461bcd60e51b815260040180806020018281038252602c815260200180611bac602c913960400191505060405180910390fd5b6001600160a01b038216600081815260036020908152604091829020805460ff191685151590811790915582519384529083015280517f44f92d27abdf4cfb6a7d712c3af68f3be086d4ca747ab802c36f67d6790060d89281900390910190a15050565b6000546001600160a01b031690565b60606110c183838080601f016020809104026020016040519081016040528093929190818152602001838380828437600092019190915250339250611a59915050565b611112576040805162461bcd60e51b815260206004820152601560248201527f666972737420706172616d20213d2073656e6465720000000000000000000000604482015290519081900360640190fd5b83156111235761112333868661190c565b60006060866001600160a01b0316348686604051808383808284376040519201945060009350909150508083038185875af1925050503d8060008114611185576040519150601f19603f3d011682016040523d82523d6000602084013e61118a565b606091505b509150915081819061121a5760405162461bcd60e51b81526004018080602001828103825283818151815260200191508051906020019080838360005b838110156111df5781810151838201526020016111c7565b50505050905090810190601f16801561120c5780820380516001836020036101000a031916815260200191505b509250505060405180910390fd5b509695505050505050565b606061126883838080601f016020809104026020016040519081016040528093929190818152602001838380828437600092019190915250339250611a59915050565b6112b9576040805162461bcd60e51b815260206004820152601560248201527f666972737420706172616d20213d2073656e6465720000000000000000000000604482015290519081900360640190fd5b611123338686611504565b6000606060005a3360009081526001602052604090205490915060ff1661131c5760405162461bcd60e51b815260040180806020018281038252603a815260200180611c05603a913960400191505060405180910390fd5b61135f8c8c8c8c89898080601f01602080910402602001604051908101604052809392919081815260200183838082843760009201919091525061196792505050565b90935091508715611378576113788c8a8a848b8b611a84565b50995099975050505050505050565b3360009081526001602052604081205460609060ff166113d85760405162461bcd60e51b815260040180806020018281038252603a815260200180611c05603a913960400191505060405180910390fd5b856001600160a01b03168585856040518083838082843760405192019450600093509091505080830381838787f1925050503d8060008114611436576040519150601f19603f3d011682016040523d82523d6000602084013e61143b565b606091505b509092509050603f85045a1161144d57fe5b94509492505050565b6001600160a01b03918216600090815260066020908152604080832093909416825291909152205490565b6000805a3360009081526001602052604090205490915060ff166114d65760405162461bcd60e51b815260040180806020018281038252603f815260200180611b33603f913960400191505060405180910390fd5b6114e18989896117d8565b84156114f5576114f5898787848888611a84565b50600198975050505050505050565b6001600160a01b0383161580159061152457506001600160a01b03821615155b611575576040805162461bcd60e51b815260206004820152601760248201527f43616e6e6f7420617070726f7665207769746820307830000000000000000000604482015290519081900360640190fd5b6001600160a01b03808416600081815260066020908152604080832094871680845294825291829020859055815185815291517f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b9259281900390910190a3505050565b6000811161162c576040805162461bcd60e51b815260206004820152601460248201527f63616e6e6f74206275726e203020746f6b656e73000000000000000000000000604482015290519081900360640190fd5b336001600160a01b0383161480159061165557503360009081526003602052604090205460ff16155b15611707576001600160a01b0382166000908152600660209081526040808320338452909152902054818110156116d3576040805162461bcd60e51b815260206004820152601860248201527f4e6f7420656e6f7567682066756e647320616c6c6f7765640000000000000000604482015290519081900360640190fd5b8060001914611705576001600160a01b0383166000908152600660209081526040808320338452909152902082820390555b505b6001600160a01b03821660009081526005602052604090205481811015611775576040805162461bcd60e51b815260206004820152601060248201527f4e6f7420656e6f7567682066756e647300000000000000000000000000000000604482015290519081900360640190fd5b6001600160a01b03831660008181526005602090815260408083208686039055600480548790039055805186815290519293927fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef929181900390910190a3505050565b6001600160a01b038216611833576040805162461bcd60e51b815260206004820152601260248201527f43616e6e6f742073656e6420746f203078300000000000000000000000000000604482015290519081900360640190fd5b6001600160a01b038316600090815260056020526040902054818110156118a1576040805162461bcd60e51b815260206004820152600f60248201527f6e6f7420656e6f7567682066756e640000000000000000000000000000000000604482015290519081900360640190fd5b6001600160a01b0380851660008181526005602090815260408083208787039055938716808352918490208054870190558351868152935191937fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef929081900390910190a350505050565b600081118015611922575061192082610d3c565b155b15611962576001600160a01b038084166000908152600660209081526040808320938616835292905220548181101561196057611960848484611504565b505b505050565b60006060841561197c5761197c87878761190c565b856001600160a01b031684846040518082805190602001908083835b602083106119d557805182527fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe09092019160209182019101611998565b6001836020036101000a03801982511681845116808217855250505050505090500191505060006040518083038160008787f1925050503d8060008114611a38576040519150601f19603f3d011682016040523d82523d6000602084013e611a3d565b606091505b509092509050603f84045a11611a4f57fe5b9550959350505050565b6000604483511015611a6d57506000610b1f565b5060248201516001600160a01b0382161492915050565b60005a8403905085811115611a965750845b820184810285828281611aa557fe5b0414611af8576040805162461bcd60e51b815260206004820152600860248201527f6f766572666c6f77000000000000000000000000000000000000000000000000604482015290519081900360640190fd5b611b038884836117d8565b505050505050505056fe6d73672e73656e64657220213d206f776e6572202626202173757065724f70657261746f726f6e6c7920657865637574696f6e206f70657261746f727320616c6c6f77656420746f2070657266726f6d207472616e7366657220616e64206368617267656f6e6c7920657865637574696f6e2061646d696e20697320616c6c6f77656420746f2061646420657865637574696f6e206f70657261746f72736f6e6c792061646d696e20697320616c6c6f77656420746f20616464207375706572206f70657261746f72736f6e6c7920657865637574696f6e41646d696e2063616e206368616e676520657865637574696f6e41646d696e6f6e6c7920657865637574696f6e206f70657261746f727320616c6c6f77656420746f2065786563757465206f6e2053414e4420626568616c66a265627a7a72305820c7a438998ba2dc88fc9df905ee2425cd3898a4efc17aeb7ccfef84f57510980864736f6c63430005090032", + "solidityMetadata": "{\"compiler\":{\"version\":\"0.5.9+commit.e560f70d\"},\"language\":\"Solidity\",\"output\":{\"abi\":[{\"constant\":true,\"inputs\":[],\"name\":\"name\",\"outputs\":[{\"name\":\"\",\"type\":\"string\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"name\":\"newAdmin\",\"type\":\"address\"}],\"name\":\"changeExecutionAdmin\",\"outputs\":[],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"name\":\"spender\",\"type\":\"address\"},{\"name\":\"amount\",\"type\":\"uint256\"}],\"name\":\"approve\",\"outputs\":[{\"name\":\"success\",\"type\":\"bool\"}],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"totalSupply\",\"outputs\":[{\"name\":\"\",\"type\":\"uint256\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"name\":\"owner\",\"type\":\"address\"},{\"name\":\"amount\",\"type\":\"uint256\"}],\"name\":\"burnFor\",\"outputs\":[{\"name\":\"\",\"type\":\"bool\"}],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"name\":\"from\",\"type\":\"address\"},{\"name\":\"to\",\"type\":\"address\"},{\"name\":\"amount\",\"type\":\"uint256\"}],\"name\":\"transferFrom\",\"outputs\":[{\"name\":\"success\",\"type\":\"bool\"}],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"name\":\"owner\",\"type\":\"address\"},{\"name\":\"spender\",\"type\":\"address\"},{\"name\":\"amount\",\"type\":\"uint256\"}],\"name\":\"approveFor\",\"outputs\":[{\"name\":\"success\",\"type\":\"bool\"}],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"decimals\",\"outputs\":[{\"name\":\"\",\"type\":\"uint8\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"name\":\"owner\",\"type\":\"address\"},{\"name\":\"spender\",\"type\":\"address\"},{\"name\":\"amountNeeded\",\"type\":\"uint256\"}],\"name\":\"addAllowanceIfNeeded\",\"outputs\":[{\"name\":\"success\",\"type\":\"bool\"}],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"name\":\"amount\",\"type\":\"uint256\"}],\"name\":\"burn\",\"outputs\":[{\"name\":\"\",\"type\":\"bool\"}],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[{\"name\":\"who\",\"type\":\"address\"}],\"name\":\"isExecutionOperator\",\"outputs\":[{\"name\":\"\",\"type\":\"bool\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[{\"name\":\"who\",\"type\":\"address\"}],\"name\":\"isSuperOperator\",\"outputs\":[{\"name\":\"\",\"type\":\"bool\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"name\":\"executionOperator\",\"type\":\"address\"},{\"name\":\"enabled\",\"type\":\"bool\"}],\"name\":\"setExecutionOperator\",\"outputs\":[],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"getAdmin\",\"outputs\":[{\"name\":\"\",\"type\":\"address\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[{\"name\":\"owner\",\"type\":\"address\"}],\"name\":\"balanceOf\",\"outputs\":[{\"name\":\"\",\"type\":\"uint256\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"name\":\"from\",\"type\":\"address\"},{\"name\":\"to\",\"type\":\"address\"},{\"name\":\"amount\",\"type\":\"uint256\"},{\"name\":\"gasLimit\",\"type\":\"uint256\"},{\"name\":\"data\",\"type\":\"bytes\"}],\"name\":\"approveAndExecuteWithSpecificGas\",\"outputs\":[{\"name\":\"success\",\"type\":\"bool\"},{\"name\":\"returnData\",\"type\":\"bytes\"}],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"name\":\"newAdmin\",\"type\":\"address\"}],\"name\":\"changeAdmin\",\"outputs\":[],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"symbol\",\"outputs\":[{\"name\":\"\",\"type\":\"string\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"name\":\"to\",\"type\":\"address\"},{\"name\":\"amount\",\"type\":\"uint256\"}],\"name\":\"transfer\",\"outputs\":[{\"name\":\"success\",\"type\":\"bool\"}],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"name\":\"superOperator\",\"type\":\"address\"},{\"name\":\"enabled\",\"type\":\"bool\"}],\"name\":\"setSuperOperator\",\"outputs\":[],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"getExecutionAdmin\",\"outputs\":[{\"name\":\"\",\"type\":\"address\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"name\":\"target\",\"type\":\"address\"},{\"name\":\"amount\",\"type\":\"uint256\"},{\"name\":\"data\",\"type\":\"bytes\"}],\"name\":\"paidCall\",\"outputs\":[{\"name\":\"\",\"type\":\"bytes\"}],\"payable\":true,\"stateMutability\":\"payable\",\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"name\":\"target\",\"type\":\"address\"},{\"name\":\"amount\",\"type\":\"uint256\"},{\"name\":\"data\",\"type\":\"bytes\"}],\"name\":\"approveAndCall\",\"outputs\":[{\"name\":\"\",\"type\":\"bytes\"}],\"payable\":true,\"stateMutability\":\"payable\",\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"name\":\"from\",\"type\":\"address\"},{\"name\":\"to\",\"type\":\"address\"},{\"name\":\"amount\",\"type\":\"uint256\"},{\"name\":\"gasLimit\",\"type\":\"uint256\"},{\"name\":\"tokenGasPrice\",\"type\":\"uint256\"},{\"name\":\"baseGasCharge\",\"type\":\"uint256\"},{\"name\":\"tokenReceiver\",\"type\":\"address\"},{\"name\":\"data\",\"type\":\"bytes\"}],\"name\":\"approveAndExecuteWithSpecificGasAndChargeForIt\",\"outputs\":[{\"name\":\"success\",\"type\":\"bool\"},{\"name\":\"returnData\",\"type\":\"bytes\"}],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"name\":\"to\",\"type\":\"address\"},{\"name\":\"gasLimit\",\"type\":\"uint256\"},{\"name\":\"data\",\"type\":\"bytes\"}],\"name\":\"executeWithSpecificGas\",\"outputs\":[{\"name\":\"success\",\"type\":\"bool\"},{\"name\":\"returnData\",\"type\":\"bytes\"}],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[{\"name\":\"owner\",\"type\":\"address\"},{\"name\":\"spender\",\"type\":\"address\"}],\"name\":\"allowance\",\"outputs\":[{\"name\":\"remaining\",\"type\":\"uint256\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"name\":\"from\",\"type\":\"address\"},{\"name\":\"to\",\"type\":\"address\"},{\"name\":\"amount\",\"type\":\"uint256\"},{\"name\":\"gasLimit\",\"type\":\"uint256\"},{\"name\":\"tokenGasPrice\",\"type\":\"uint256\"},{\"name\":\"baseGasCharge\",\"type\":\"uint256\"},{\"name\":\"tokenReceiver\",\"type\":\"address\"}],\"name\":\"transferAndChargeForGas\",\"outputs\":[{\"name\":\"\",\"type\":\"bool\"}],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"name\":\"sandAdmin\",\"type\":\"address\"},{\"name\":\"executionAdmin\",\"type\":\"address\"},{\"name\":\"beneficiary\",\"type\":\"address\"}],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"constructor\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"name\":\"from\",\"type\":\"address\"},{\"indexed\":true,\"name\":\"to\",\"type\":\"address\"},{\"indexed\":false,\"name\":\"value\",\"type\":\"uint256\"}],\"name\":\"Transfer\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"name\":\"owner\",\"type\":\"address\"},{\"indexed\":true,\"name\":\"spender\",\"type\":\"address\"},{\"indexed\":false,\"name\":\"value\",\"type\":\"uint256\"}],\"name\":\"Approval\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"name\":\"superOperator\",\"type\":\"address\"},{\"indexed\":false,\"name\":\"enabled\",\"type\":\"bool\"}],\"name\":\"SuperOperator\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"name\":\"oldAdmin\",\"type\":\"address\"},{\"indexed\":false,\"name\":\"newAdmin\",\"type\":\"address\"}],\"name\":\"AdminChanged\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"name\":\"oldAdmin\",\"type\":\"address\"},{\"indexed\":false,\"name\":\"newAdmin\",\"type\":\"address\"}],\"name\":\"ExecutionAdminAdminChanged\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"name\":\"executionOperator\",\"type\":\"address\"},{\"indexed\":false,\"name\":\"enabled\",\"type\":\"bool\"}],\"name\":\"ExecutionOperator\",\"type\":\"event\"}],\"devdoc\":{\"methods\":{\"allowance(address,address)\":{\"params\":{\"owner\":\"address whose token is allowed.\",\"spender\":\"address allowed to transfer.\"},\"return\":\"the amount of token `spender` is allowed to transfer on behalf of `owner`.\"},\"approve(address,uint256)\":{\"params\":{\"amount\":\"the number of tokens allowed.\",\"spender\":\"address to be given rights to transfer.\"},\"return\":\"true if success.\"},\"approveAndCall(address,uint256,bytes)\":{\"params\":{\"amount\":\"the number of tokens allowed.\",\"data\":\"bytes for the call.\",\"target\":\"address to be given rights to transfer and destination of the call.\"},\"return\":\"data of the call.\"},\"approveAndExecuteWithSpecificGas(address,address,uint256,uint256,bytes)\":{\"params\":{\"amount\":\"number of tokens allowed that can be transfer by the code at `to`.\",\"data\":\"the bytes sent to the destination address.\",\"from\":\"address of which token will be transfered.\",\"gasLimit\":\"exact amount of gas to be passed to the call.\",\"to\":\"destination address fo the call.\"},\"return\":\"success whether the execution was successful.returnData data resulting from the execution.\"},\"approveAndExecuteWithSpecificGasAndChargeForIt(address,address,uint256,uint256,uint256,uint256,address,bytes)\":{\"details\":\"the reason for this function is that charging for gas here is more gas-efficient than doing it in the caller.\",\"params\":{\"amount\":\"number of tokens allowed that can be transfer by the code at `to`.\",\"baseGasCharge\":\"amount of gas charged on top of the gas used for the call.\",\"data\":\"the bytes sent to the destination address.\",\"from\":\"address of which token will be transfered.\",\"gasLimit\":\"exact amount of gas to be passed to the call.\",\"to\":\"destination address fo the call.\",\"tokenGasPrice\":\"price in token for the gas to be charged.\",\"tokenReceiver\":\"recipient address of the token charged for the gas used.\"},\"return\":\"success whether the execution was successful.returnData data resulting from the execution.\"},\"approveFor(address,address,uint256)\":{\"params\":{\"amount\":\"the number of tokens allowed.\",\"owner\":\"address whose token is allowed.\",\"spender\":\"address to be given rights to transfer.\"},\"return\":\"true if success.\"},\"balanceOf(address)\":{\"params\":{\"owner\":\"The address to query the balance of.\"},\"return\":\"The amount owned by `owner`.\"},\"burn(uint256)\":{\"params\":{\"amount\":\"the number of tokens to burn.\"},\"return\":\"true if success.\"},\"burnFor(address,uint256)\":{\"params\":{\"amount\":\"the number of token to burn.\",\"owner\":\"address whose token is to burn.\"},\"return\":\"true if success.\"},\"changeAdmin(address)\":{\"params\":{\"newAdmin\":\"address of the new administrator.\"}},\"changeExecutionAdmin(address)\":{\"params\":{\"newAdmin\":\"address of the new administrator.\"}},\"decimals()\":{\"return\":\"the number of decimals.\"},\"executeWithSpecificGas(address,uint256,bytes)\":{\"params\":{\"data\":\"the bytes sent to the destination address.\",\"gasLimit\":\"exact amount of gas to be passed to the call.\",\"to\":\"destination address fo the call.\"},\"return\":\"success whether the execution was successful.returnData data resulting from the execution.\"},\"getAdmin()\":{\"return\":\"the current administrator of this contract.\"},\"getExecutionAdmin()\":{\"return\":\"address of the execution administrator.\"},\"isExecutionOperator(address)\":{\"params\":{\"who\":\"The address to query.\"},\"return\":\"whether the address has executionOperator rights.\"},\"isSuperOperator(address)\":{\"params\":{\"who\":\"The address to query.\"},\"return\":\"whether the address has superOperator rights.\"},\"name()\":{\"return\":\"name of the tokens\"},\"paidCall(address,uint256,bytes)\":{\"params\":{\"amount\":\"the number of tokens allowed to spend.\",\"data\":\"bytes for the call.\",\"target\":\"destination of the call, allowed to spend the amount specified\"},\"return\":\"data of the call.\"},\"setExecutionOperator(address,bool)\":{\"params\":{\"enabled\":\"set whether the executionOperator is enabled or disabled.\",\"executionOperator\":\"address that will be given/removed executionOperator right.\"}},\"setSuperOperator(address,bool)\":{\"params\":{\"enabled\":\"set whether the superOperator is enabled or disabled.\",\"superOperator\":\"address that will be given/removed superOperator right.\"}},\"symbol()\":{\"return\":\"symbol of the tokens\"},\"totalSupply()\":{\"return\":\"the total number of tokens in existence.\"},\"transfer(address,uint256)\":{\"params\":{\"amount\":\"the number of tokens transfered.\",\"to\":\"the recipient address of the tokens transfered.\"},\"return\":\"true if success.\"},\"transferAndChargeForGas(address,address,uint256,uint256,uint256,uint256,address)\":{\"params\":{\"amount\":\"number of tokens allowed that can be transfer by the code at `to`.\",\"baseGasCharge\":\"amount of gas charged on top of the gas used for the call.\",\"from\":\"address of which token will be transfered.\",\"gasLimit\":\"exact amount of gas to be passed to the call.\",\"to\":\"destination address fo the call.\",\"tokenGasPrice\":\"price in token for the gas to be charged.\",\"tokenReceiver\":\"recipient address of the token charged for the gas used.\"},\"return\":\"whether the transfer was successful.\"},\"transferFrom(address,address,uint256)\":{\"params\":{\"amount\":\"the number of tokens transfered.\",\"from\":\"whose token it is transferring from.\",\"to\":\"the recipient address of the tokens transfered.\"},\"return\":\"true if success.\"}}},\"userdoc\":{\"methods\":{\"allowance(address,address)\":{\"notice\":\"gets allowance of `spender` for `owner`'s tokens.\"},\"approve(address,uint256)\":{\"notice\":\"approve `spender` to transfer `amount` tokens.\"},\"approveAndCall(address,uint256,bytes)\":{\"notice\":\"approve `target` to spend `amount` and call it with data.\"},\"approveAndExecuteWithSpecificGas(address,address,uint256,uint256,bytes)\":{\"notice\":\"approve a specific amount of token for `from` and execute on behalf of the contract.\"},\"approveAndExecuteWithSpecificGasAndChargeForIt(address,address,uint256,uint256,uint256,uint256,address,bytes)\":{\"notice\":\"approve a specific amount of token for `from` and execute on behalf of the contract. Plus charge the gas required to perform it.\"},\"approveFor(address,address,uint256)\":{\"notice\":\"approve `spender` to transfer `amount` tokens from `owner`.\"},\"balanceOf(address)\":{\"notice\":\"Gets the balance of `owner`.\"},\"burn(uint256)\":{\"notice\":\"burn `amount` tokens.\"},\"burnFor(address,uint256)\":{\"notice\":\"burn `amount` tokens from `owner`.\"},\"changeAdmin(address)\":{\"notice\":\"change the administrator to be `newAdmin`.\"},\"changeExecutionAdmin(address)\":{\"notice\":\"change the execution adminstrator to be `newAdmin`.\"},\"decimals()\":{\"notice\":\"returns the number of decimals for that token.\"},\"executeWithSpecificGas(address,uint256,bytes)\":{\"notice\":\"execute on behalf of the contract.\"},\"getAdmin()\":{\"notice\":\"gives the current administrator of this contract.\"},\"getExecutionAdmin()\":{\"notice\":\"give the address responsible for adding execution rights.\"},\"isExecutionOperator(address)\":{\"notice\":\"check whether address `who` is given executionOperator rights.\"},\"isSuperOperator(address)\":{\"notice\":\"check whether address `who` is given superOperator rights.\"},\"name()\":{\"notice\":\"A descriptive name for the tokens\"},\"paidCall(address,uint256,bytes)\":{\"notice\":\"temporarly approve `target` to spend `amount` and call it with data. Previous approvals remains unchanged.\"},\"setExecutionOperator(address,bool)\":{\"notice\":\"set `executionOperator` as executionOperator: `enabled`.\"},\"setSuperOperator(address,bool)\":{\"notice\":\"Enable or disable the ability of `superOperator` to transfer tokens of all (superOperator rights).\"},\"symbol()\":{\"notice\":\"An abbreviated name for the tokens\"},\"totalSupply()\":{\"notice\":\"Gets the total number of tokens in existence.\"},\"transfer(address,uint256)\":{\"notice\":\"Transfer `amount` tokens to `to`.\"},\"transferAndChargeForGas(address,address,uint256,uint256,uint256,uint256,address)\":{\"notice\":\"transfer 1amount1 token from `from` to `to` and charge the gas required to perform that transfer.\"},\"transferFrom(address,address,uint256)\":{\"notice\":\"Transfer `amount` tokens from `from` to `to`.\"}}}},\"settings\":{\"compilationTarget\":{\"src/Sand.sol\":\"Sand\"},\"evmVersion\":\"petersburg\",\"libraries\":{},\"metadata\":{\"useLiteralContent\":true},\"optimizer\":{\"enabled\":true,\"runs\":2000},\"remappings\":[]},\"sources\":{\"contracts_common/src/BaseWithStorage/Admin.sol\":{\"content\":\"pragma solidity ^0.5.2;\\n\\ncontract Admin {\\n\\n address internal _admin;\\n\\n event AdminChanged(address oldAdmin, address newAdmin);\\n\\n /// @notice gives the current administrator of this contract.\\n /// @return the current administrator of this contract.\\n function getAdmin() external view returns (address) {\\n return _admin;\\n }\\n\\n /// @notice change the administrator to be `newAdmin`.\\n /// @param newAdmin address of the new administrator.\\n function changeAdmin(address newAdmin) external {\\n require(msg.sender == _admin, \\\"only admin can change admin\\\");\\n emit AdminChanged(_admin, newAdmin);\\n _admin = newAdmin;\\n }\\n}\\n\",\"keccak256\":\"0x74418caab05cca3fe5b9309ab069a9bfe327ff96f593a347e1f1cc0c02f25693\"},\"contracts_common/src/BaseWithStorage/SuperOperators.sol\":{\"content\":\"pragma solidity ^0.5.2;\\n\\nimport \\\"./Admin.sol\\\";\\n\\ncontract SuperOperators is Admin {\\n\\n mapping(address => bool) internal _superOperators;\\n\\n event SuperOperator(address superOperator, bool enabled);\\n\\n /// @notice Enable or disable the ability of `superOperator` to transfer tokens of all (superOperator rights).\\n /// @param superOperator address that will be given/removed superOperator right.\\n /// @param enabled set whether the superOperator is enabled or disabled.\\n function setSuperOperator(address superOperator, bool enabled) external {\\n require(\\n msg.sender == _admin,\\n \\\"only admin is allowed to add super operators\\\"\\n );\\n _superOperators[superOperator] = enabled;\\n emit SuperOperator(superOperator, enabled);\\n }\\n\\n /// @notice check whether address `who` is given superOperator rights.\\n /// @param who The address to query.\\n /// @return whether the address has superOperator rights.\\n function isSuperOperator(address who) public view returns (bool) {\\n return _superOperators[who];\\n }\\n}\\n\",\"keccak256\":\"0x22354cf60ccf77a6de61c13bdaf4e3094d115b960ae563b0527622c846a12abb\"},\"contracts_common/src/Interfaces/ERC20Events.sol\":{\"content\":\"pragma solidity ^0.5.2;\\n\\n/* interface */\\ncontract ERC20Events {\\n event Transfer(address indexed from, address indexed to, uint256 value);\\n event Approval(\\n address indexed owner,\\n address indexed spender,\\n uint256 value\\n );\\n}\\n\",\"keccak256\":\"0xee09c10a3f9adc913227efdcd94ce44e05b59b04717f8f868153d356bd03f5d2\"},\"contracts_common/src/Libraries/BytesUtil.sol\":{\"content\":\"pragma solidity ^0.5.2;\\n\\nlibrary BytesUtil {\\n function memcpy(uint256 dest, uint256 src, uint256 len) internal pure {\\n // Copy word-length chunks while possible\\n for (; len >= 32; len -= 32) {\\n assembly {\\n mstore(dest, mload(src))\\n }\\n dest += 32;\\n src += 32;\\n }\\n\\n // Copy remaining bytes\\n uint256 mask = 256**(32 - len) - 1;\\n assembly {\\n let srcpart := and(mload(src), not(mask))\\n let destpart := and(mload(dest), mask)\\n mstore(dest, or(destpart, srcpart))\\n }\\n }\\n\\n function pointerToBytes(uint256 src, uint256 len)\\n internal\\n pure\\n returns (bytes memory)\\n {\\n bytes memory ret = new bytes(len);\\n uint256 retptr;\\n assembly {\\n retptr := add(ret, 32)\\n }\\n\\n memcpy(retptr, src, len);\\n return ret;\\n }\\n\\n function addressToBytes(address a) internal pure returns (bytes memory b) {\\n assembly {\\n let m := mload(0x40)\\n mstore(\\n add(m, 20),\\n xor(0x140000000000000000000000000000000000000000, a)\\n )\\n mstore(0x40, add(m, 52))\\n b := m\\n }\\n }\\n\\n function uint256ToBytes(uint256 a) internal pure returns (bytes memory b) {\\n assembly {\\n let m := mload(0x40)\\n mstore(add(m, 32), a)\\n mstore(0x40, add(m, 64))\\n b := m\\n }\\n }\\n\\n function doFirstParamEqualsAddress(bytes memory data, address _address)\\n internal\\n pure\\n returns (bool)\\n {\\n if (data.length < (36 + 32)) {\\n return false;\\n }\\n uint256 value;\\n assembly {\\n value := mload(add(data, 36))\\n }\\n return value == uint256(_address);\\n }\\n\\n function doParamEqualsUInt256(bytes memory data, uint256 i, uint256 value)\\n internal\\n pure\\n returns (bool)\\n {\\n if (data.length < (36 + (i + 1) * 32)) {\\n return false;\\n }\\n uint256 offset = 36 + i * 32;\\n uint256 valuePresent;\\n assembly {\\n valuePresent := mload(add(data, offset))\\n }\\n return valuePresent == value;\\n }\\n\\n function overrideFirst32BytesWithAddress(\\n bytes memory data,\\n address _address\\n ) internal pure returns (bytes memory) {\\n uint256 dest;\\n assembly {\\n dest := add(data, 48)\\n } // 48 = 32 (offset) + 4 (func sig) + 12 (address is only 20 bytes)\\n\\n bytes memory addressBytes = addressToBytes(_address);\\n uint256 src;\\n assembly {\\n src := add(addressBytes, 32)\\n }\\n\\n memcpy(dest, src, 20);\\n return data;\\n }\\n\\n function overrideFirstTwo32BytesWithAddressAndInt(\\n bytes memory data,\\n address _address,\\n uint256 _value\\n ) internal pure returns (bytes memory) {\\n uint256 dest;\\n uint256 src;\\n\\n assembly {\\n dest := add(data, 48)\\n } // 48 = 32 (offset) + 4 (func sig) + 12 (address is only 20 bytes)\\n bytes memory bbytes = addressToBytes(_address);\\n assembly {\\n src := add(bbytes, 32)\\n }\\n memcpy(dest, src, 20);\\n\\n assembly {\\n dest := add(data, 68)\\n } // 48 = 32 (offset) + 4 (func sig) + 32 (next slot)\\n bbytes = uint256ToBytes(_value);\\n assembly {\\n src := add(bbytes, 32)\\n }\\n memcpy(dest, src, 32);\\n\\n return data;\\n }\\n}\\n\",\"keccak256\":\"0xb5c236938e1f71524127371a015836e83103c5ac1b4ed7b7f22892a8c0429e10\"},\"src/Sand.sol\":{\"content\":\"pragma solidity 0.5.9;\\n\\nimport \\\"./Sand/erc20/ERC20ExecuteExtension.sol\\\";\\nimport \\\"./Sand/erc20/ERC20BaseToken.sol\\\";\\nimport \\\"./Sand/erc20/ERC20BasicApproveExtension.sol\\\";\\n\\ncontract Sand is ERC20ExecuteExtension, ERC20BasicApproveExtension, ERC20BaseToken {\\n\\n constructor(address sandAdmin, address executionAdmin, address beneficiary) public {\\n _admin = sandAdmin;\\n _executionAdmin = executionAdmin;\\n _mint(beneficiary, 3000000000000000000000000000);\\n }\\n\\n /// @notice A descriptive name for the tokens\\n /// @return name of the tokens\\n function name() public view returns (string memory) {\\n return \\\"SAND\\\";\\n }\\n\\n /// @notice An abbreviated name for the tokens\\n /// @return symbol of the tokens\\n function symbol() public view returns (string memory) {\\n return \\\"SAND\\\";\\n }\\n\\n}\\n\",\"keccak256\":\"0xe05c8232fddc05f34648fa1db29cbfff2d163357e613425a925d80dbefff75eb\"},\"src/Sand/erc20/ERC20BaseToken.sol\":{\"content\":\"pragma solidity 0.5.9;\\n\\nimport \\\"../../../contracts_common/src/Interfaces/ERC20Events.sol\\\";\\nimport \\\"../../../contracts_common/src/BaseWithStorage/SuperOperators.sol\\\";\\n\\ncontract ERC20BaseToken is SuperOperators, ERC20Events {\\n\\n uint256 internal _totalSupply;\\n mapping(address => uint256) internal _balances;\\n mapping(address => mapping(address => uint256)) internal _allowances;\\n\\n /// @notice Gets the total number of tokens in existence.\\n /// @return the total number of tokens in existence.\\n function totalSupply() public view returns (uint256) {\\n return _totalSupply;\\n }\\n\\n /// @notice Gets the balance of `owner`.\\n /// @param owner The address to query the balance of.\\n /// @return The amount owned by `owner`.\\n function balanceOf(address owner) public view returns (uint256) {\\n return _balances[owner];\\n }\\n\\n /// @notice gets allowance of `spender` for `owner`'s tokens.\\n /// @param owner address whose token is allowed.\\n /// @param spender address allowed to transfer.\\n /// @return the amount of token `spender` is allowed to transfer on behalf of `owner`.\\n function allowance(address owner, address spender)\\n public\\n view\\n returns (uint256 remaining)\\n {\\n return _allowances[owner][spender];\\n }\\n\\n /// @notice returns the number of decimals for that token.\\n /// @return the number of decimals.\\n function decimals() public view returns (uint8) {\\n return uint8(18);\\n }\\n\\n /// @notice Transfer `amount` tokens to `to`.\\n /// @param to the recipient address of the tokens transfered.\\n /// @param amount the number of tokens transfered.\\n /// @return true if success.\\n function transfer(address to, uint256 amount)\\n public\\n returns (bool success)\\n {\\n _transfer(msg.sender, to, amount);\\n return true;\\n }\\n\\n /// @notice Transfer `amount` tokens from `from` to `to`.\\n /// @param from whose token it is transferring from.\\n /// @param to the recipient address of the tokens transfered.\\n /// @param amount the number of tokens transfered.\\n /// @return true if success.\\n function transferFrom(address from, address to, uint256 amount)\\n public\\n returns (bool success)\\n {\\n if (msg.sender != from && !_superOperators[msg.sender]) {\\n uint256 currentAllowance = _allowances[from][msg.sender];\\n if (currentAllowance != (2**256) - 1) {\\n // save gas when allowance is maximal by not reducing it (see https://github.com/ethereum/EIPs/issues/717)\\n require(currentAllowance >= amount, \\\"Not enough funds allowed\\\");\\n _allowances[from][msg.sender] = currentAllowance - amount;\\n }\\n }\\n _transfer(from, to, amount);\\n return true;\\n }\\n\\n /// @notice burn `amount` tokens.\\n /// @param amount the number of tokens to burn.\\n /// @return true if success.\\n function burn(uint256 amount) external returns (bool) {\\n _burn(msg.sender, amount);\\n return true;\\n }\\n\\n /// @notice burn `amount` tokens from `owner`.\\n /// @param owner address whose token is to burn.\\n /// @param amount the number of token to burn.\\n /// @return true if success.\\n function burnFor(address owner, uint256 amount) external returns (bool) {\\n _burn(owner, amount);\\n return true;\\n }\\n\\n /// @notice approve `spender` to transfer `amount` tokens.\\n /// @param spender address to be given rights to transfer.\\n /// @param amount the number of tokens allowed.\\n /// @return true if success.\\n function approve(address spender, uint256 amount)\\n public\\n returns (bool success)\\n {\\n _approveFor(msg.sender, spender, amount);\\n return true;\\n }\\n\\n /// @notice approve `spender` to transfer `amount` tokens from `owner`.\\n /// @param owner address whose token is allowed.\\n /// @param spender address to be given rights to transfer.\\n /// @param amount the number of tokens allowed.\\n /// @return true if success.\\n function approveFor(address owner, address spender, uint256 amount)\\n public\\n returns (bool success)\\n {\\n require(\\n msg.sender == owner || _superOperators[msg.sender],\\n \\\"msg.sender != owner && !superOperator\\\"\\n );\\n _approveFor(owner, spender, amount);\\n return true;\\n }\\n\\n function addAllowanceIfNeeded(address owner, address spender, uint256 amountNeeded)\\n public\\n returns (bool success)\\n {\\n require(\\n msg.sender == owner || _superOperators[msg.sender],\\n \\\"msg.sender != owner && !superOperator\\\"\\n );\\n _addAllowanceIfNeeded(owner, spender, amountNeeded);\\n return true;\\n }\\n\\n function _addAllowanceIfNeeded(address owner, address spender, uint256 amountNeeded)\\n internal\\n {\\n if(amountNeeded > 0 && !isSuperOperator(spender)) {\\n uint256 currentAllowance = _allowances[owner][spender];\\n if(currentAllowance < amountNeeded) {\\n _approveFor(owner, spender, amountNeeded);\\n }\\n }\\n }\\n\\n function _approveFor(address owner, address spender, uint256 amount)\\n internal\\n {\\n require(\\n owner != address(0) && spender != address(0),\\n \\\"Cannot approve with 0x0\\\"\\n );\\n _allowances[owner][spender] = amount;\\n emit Approval(owner, spender, amount);\\n }\\n\\n function _transfer(address from, address to, uint256 amount) internal {\\n require(to != address(0), \\\"Cannot send to 0x0\\\");\\n uint256 currentBalance = _balances[from];\\n require(currentBalance >= amount, \\\"not enough fund\\\");\\n _balances[from] = currentBalance - amount;\\n _balances[to] += amount;\\n emit Transfer(from, to, amount);\\n }\\n\\n function _mint(address to, uint256 amount) internal {\\n require(to != address(0), \\\"Cannot mint to 0x0\\\");\\n require(amount > 0, \\\"cannot mint 0 tokens\\\");\\n uint256 currentTotalSupply = _totalSupply;\\n uint256 newTotalSupply = currentTotalSupply + amount;\\n require(newTotalSupply > currentTotalSupply, \\\"overflow\\\");\\n _totalSupply = newTotalSupply;\\n _balances[to] += amount;\\n emit Transfer(address(0), to, amount);\\n }\\n\\n function _burn(address from, uint256 amount) internal {\\n require(amount > 0, \\\"cannot burn 0 tokens\\\");\\n if (msg.sender != from && !_superOperators[msg.sender]) {\\n uint256 currentAllowance = _allowances[from][msg.sender];\\n require(\\n currentAllowance >= amount,\\n \\\"Not enough funds allowed\\\"\\n );\\n if (currentAllowance != (2**256) - 1) {\\n // save gas when allowance is maximal by not reducing it (see https://github.com/ethereum/EIPs/issues/717)\\n _allowances[from][msg.sender] = currentAllowance - amount;\\n }\\n }\\n\\n uint256 currentBalance = _balances[from];\\n require(currentBalance >= amount, \\\"Not enough funds\\\");\\n _balances[from] = currentBalance - amount;\\n _totalSupply -= amount;\\n emit Transfer(from, address(0), amount);\\n }\\n}\\n\",\"keccak256\":\"0xc70b1452852cbe8f437ba3fdcff911ed3fd7820b0d853e5fe147a90989cc1085\"},\"src/Sand/erc20/ERC20BasicApproveExtension.sol\":{\"content\":\"pragma solidity 0.5.9;\\n\\nimport \\\"../../../contracts_common/src/Libraries/BytesUtil.sol\\\";\\n\\ncontract ERC20BasicApproveExtension {\\n\\n /// @notice approve `target` to spend `amount` and call it with data.\\n /// @param target address to be given rights to transfer and destination of the call.\\n /// @param amount the number of tokens allowed.\\n /// @param data bytes for the call.\\n /// @return data of the call.\\n function approveAndCall(\\n address target,\\n uint256 amount,\\n bytes calldata data\\n ) external payable returns (bytes memory) {\\n require(\\n BytesUtil.doFirstParamEqualsAddress(data, msg.sender),\\n \\\"first param != sender\\\"\\n );\\n\\n _approveFor(msg.sender, target, amount);\\n\\n // solium-disable-next-line security/no-call-value\\n (bool success, bytes memory returnData) = target.call.value(msg.value)(data);\\n require(success, string(returnData));\\n return returnData;\\n }\\n\\n /// @notice temporarly approve `target` to spend `amount` and call it with data. Previous approvals remains unchanged.\\n /// @param target destination of the call, allowed to spend the amount specified\\n /// @param amount the number of tokens allowed to spend.\\n /// @param data bytes for the call.\\n /// @return data of the call.\\n function paidCall(\\n address target,\\n uint256 amount,\\n bytes calldata data\\n ) external payable returns (bytes memory) {\\n require(\\n BytesUtil.doFirstParamEqualsAddress(data, msg.sender),\\n \\\"first param != sender\\\"\\n );\\n\\n if (amount > 0) {\\n _addAllowanceIfNeeded(msg.sender, target, amount);\\n }\\n\\n // solium-disable-next-line security/no-call-value\\n (bool success, bytes memory returnData) = target.call.value(msg.value)(data);\\n require(success, string(returnData));\\n\\n return returnData;\\n }\\n\\n function _approveFor(address owner, address target, uint256 amount) internal;\\n function _addAllowanceIfNeeded(address owner, address spender, uint256 amountNeeded) internal;\\n}\\n\",\"keccak256\":\"0xbd8c882843acf82adb849222068490302925e31ac66305b75f1663a719c7fc37\"},\"src/Sand/erc20/ERC20ExecuteExtension.sol\":{\"content\":\"pragma solidity 0.5.9;\\n\\n\\ncontract ERC20ExecuteExtension {\\n\\n /// @dev _executionAdmin != _admin so that this super power can be disabled independently\\n address internal _executionAdmin;\\n\\n event ExecutionAdminAdminChanged(address oldAdmin, address newAdmin);\\n\\n /// @notice give the address responsible for adding execution rights.\\n /// @return address of the execution administrator.\\n function getExecutionAdmin() external view returns (address) {\\n return _executionAdmin;\\n }\\n\\n /// @notice change the execution adminstrator to be `newAdmin`.\\n /// @param newAdmin address of the new administrator.\\n function changeExecutionAdmin(address newAdmin) external {\\n require(msg.sender == _executionAdmin, \\\"only executionAdmin can change executionAdmin\\\");\\n emit ExecutionAdminAdminChanged(_executionAdmin, newAdmin);\\n _executionAdmin = newAdmin;\\n }\\n\\n mapping(address => bool) internal _executionOperators;\\n event ExecutionOperator(address executionOperator, bool enabled);\\n\\n /// @notice set `executionOperator` as executionOperator: `enabled`.\\n /// @param executionOperator address that will be given/removed executionOperator right.\\n /// @param enabled set whether the executionOperator is enabled or disabled.\\n function setExecutionOperator(address executionOperator, bool enabled) external {\\n require(\\n msg.sender == _executionAdmin,\\n \\\"only execution admin is allowed to add execution operators\\\"\\n );\\n _executionOperators[executionOperator] = enabled;\\n emit ExecutionOperator(executionOperator, enabled);\\n }\\n\\n /// @notice check whether address `who` is given executionOperator rights.\\n /// @param who The address to query.\\n /// @return whether the address has executionOperator rights.\\n function isExecutionOperator(address who) public view returns (bool) {\\n return _executionOperators[who];\\n }\\n\\n /// @notice execute on behalf of the contract.\\n /// @param to destination address fo the call.\\n /// @param gasLimit exact amount of gas to be passed to the call.\\n /// @param data the bytes sent to the destination address.\\n /// @return success whether the execution was successful.\\n /// @return returnData data resulting from the execution.\\n function executeWithSpecificGas(address to, uint256 gasLimit, bytes calldata data) external returns (bool success, bytes memory returnData) {\\n require(_executionOperators[msg.sender], \\\"only execution operators allowed to execute on SAND behalf\\\");\\n (success, returnData) = to.call.gas(gasLimit)(data);\\n assert(gasleft() > gasLimit / 63); // not enough gas provided, assert to throw all gas // TODO use EIP-1930\\n }\\n\\n /// @notice approve a specific amount of token for `from` and execute on behalf of the contract.\\n /// @param from address of which token will be transfered.\\n /// @param to destination address fo the call.\\n /// @param amount number of tokens allowed that can be transfer by the code at `to`.\\n /// @param gasLimit exact amount of gas to be passed to the call.\\n /// @param data the bytes sent to the destination address.\\n /// @return success whether the execution was successful.\\n /// @return returnData data resulting from the execution.\\n function approveAndExecuteWithSpecificGas(\\n address from,\\n address to,\\n uint256 amount,\\n uint256 gasLimit,\\n bytes calldata data\\n ) external returns (bool success, bytes memory returnData) {\\n require(_executionOperators[msg.sender], \\\"only execution operators allowed to execute on SAND behalf\\\");\\n return _approveAndExecuteWithSpecificGas(from, to, amount, gasLimit, data);\\n }\\n\\n /// @dev the reason for this function is that charging for gas here is more gas-efficient than doing it in the caller.\\n /// @notice approve a specific amount of token for `from` and execute on behalf of the contract. Plus charge the gas required to perform it.\\n /// @param from address of which token will be transfered.\\n /// @param to destination address fo the call.\\n /// @param amount number of tokens allowed that can be transfer by the code at `to`.\\n /// @param gasLimit exact amount of gas to be passed to the call.\\n /// @param tokenGasPrice price in token for the gas to be charged.\\n /// @param baseGasCharge amount of gas charged on top of the gas used for the call.\\n /// @param tokenReceiver recipient address of the token charged for the gas used.\\n /// @param data the bytes sent to the destination address.\\n /// @return success whether the execution was successful.\\n /// @return returnData data resulting from the execution.\\n function approveAndExecuteWithSpecificGasAndChargeForIt(\\n address from,\\n address to,\\n uint256 amount,\\n uint256 gasLimit,\\n uint256 tokenGasPrice,\\n uint256 baseGasCharge,\\n address tokenReceiver,\\n bytes calldata data\\n ) external returns (bool success, bytes memory returnData) {\\n uint256 initialGas = gasleft();\\n require(_executionOperators[msg.sender], \\\"only execution operators allowed to execute on SAND behalf\\\");\\n (success, returnData) = _approveAndExecuteWithSpecificGas(from, to, amount, gasLimit, data);\\n if (tokenGasPrice > 0) {\\n _charge(from, gasLimit, tokenGasPrice, initialGas, baseGasCharge, tokenReceiver);\\n }\\n }\\n\\n /// @notice transfer 1amount1 token from `from` to `to` and charge the gas required to perform that transfer.\\n /// @param from address of which token will be transfered.\\n /// @param to destination address fo the call.\\n /// @param amount number of tokens allowed that can be transfer by the code at `to`.\\n /// @param gasLimit exact amount of gas to be passed to the call.\\n /// @param tokenGasPrice price in token for the gas to be charged.\\n /// @param baseGasCharge amount of gas charged on top of the gas used for the call.\\n /// @param tokenReceiver recipient address of the token charged for the gas used.\\n /// @return whether the transfer was successful.\\n function transferAndChargeForGas(\\n address from,\\n address to,\\n uint256 amount,\\n uint256 gasLimit,\\n uint256 tokenGasPrice,\\n uint256 baseGasCharge,\\n address tokenReceiver\\n ) external returns (bool) {\\n uint256 initialGas = gasleft();\\n require(_executionOperators[msg.sender], \\\"only execution operators allowed to perfrom transfer and charge\\\");\\n _transfer(from, to, amount);\\n if (tokenGasPrice > 0) {\\n _charge(from, gasLimit, tokenGasPrice, initialGas, baseGasCharge, tokenReceiver);\\n }\\n return true;\\n }\\n\\n function _charge(\\n address from,\\n uint256 gasLimit,\\n uint256 tokenGasPrice,\\n uint256 initialGas,\\n uint256 baseGasCharge,\\n address tokenReceiver\\n ) internal {\\n uint256 gasCharge = initialGas - gasleft();\\n if(gasCharge > gasLimit) {\\n gasCharge = gasLimit;\\n }\\n gasCharge += baseGasCharge;\\n uint256 tokensToCharge = gasCharge * tokenGasPrice;\\n require(tokensToCharge / gasCharge == tokenGasPrice, \\\"overflow\\\");\\n _transfer(from, tokenReceiver, tokensToCharge);\\n }\\n\\n function _approveAndExecuteWithSpecificGas(\\n address from,\\n address to,\\n uint256 amount,\\n uint256 gasLimit,\\n bytes memory data\\n ) internal returns (bool success, bytes memory returnData) {\\n\\n if (amount > 0) {\\n _addAllowanceIfNeeded(from, to, amount);\\n }\\n (success, returnData) = to.call.gas(gasLimit)(data);\\n assert(gasleft() > gasLimit / 63); // not enough gas provided, assert to throw all gas // TODO use EIP-1930\\n }\\n\\n\\n function _transfer(address from, address to, uint256 amount) internal;\\n function _addAllowanceIfNeeded(address owner, address spender, uint256 amountNeeded) internal;\\n}\",\"keccak256\":\"0x4b9a75299ab80e84aa287f2ecf2ef175e0feb074764e4a670f9397a2d2d4bda8\"}},\"version\":1}", + "userdoc": { + "methods": { + "allowance(address,address)": { + "notice": "gets allowance of `spender` for `owner`'s tokens." + }, + "approve(address,uint256)": { + "notice": "approve `spender` to transfer `amount` tokens." + }, + "approveAndCall(address,uint256,bytes)": { + "notice": "approve `target` to spend `amount` and call it with data." + }, + "approveAndExecuteWithSpecificGas(address,address,uint256,uint256,bytes)": { + "notice": "approve a specific amount of token for `from` and execute on behalf of the contract." + }, + "approveAndExecuteWithSpecificGasAndChargeForIt(address,address,uint256,uint256,uint256,uint256,address,bytes)": { + "notice": "approve a specific amount of token for `from` and execute on behalf of the contract. Plus charge the gas required to perform it." + }, + "approveFor(address,address,uint256)": { + "notice": "approve `spender` to transfer `amount` tokens from `owner`." + }, + "balanceOf(address)": { + "notice": "Gets the balance of `owner`." + }, + "burn(uint256)": { + "notice": "burn `amount` tokens." + }, + "burnFor(address,uint256)": { + "notice": "burn `amount` tokens from `owner`." + }, + "changeAdmin(address)": { + "notice": "change the administrator to be `newAdmin`." + }, + "changeExecutionAdmin(address)": { + "notice": "change the execution adminstrator to be `newAdmin`." + }, + "decimals()": { + "notice": "returns the number of decimals for that token." + }, + "executeWithSpecificGas(address,uint256,bytes)": { + "notice": "execute on behalf of the contract." + }, + "getAdmin()": { + "notice": "gives the current administrator of this contract." + }, + "getExecutionAdmin()": { + "notice": "give the address responsible for adding execution rights." + }, + "isExecutionOperator(address)": { + "notice": "check whether address `who` is given executionOperator rights." + }, + "isSuperOperator(address)": { + "notice": "check whether address `who` is given superOperator rights." + }, + "name()": { + "notice": "A descriptive name for the tokens" + }, + "paidCall(address,uint256,bytes)": { + "notice": "temporarly approve `target` to spend `amount` and call it with data. Previous approvals remains unchanged." + }, + "setExecutionOperator(address,bool)": { + "notice": "set `executionOperator` as executionOperator: `enabled`." + }, + "setSuperOperator(address,bool)": { + "notice": "Enable or disable the ability of `superOperator` to transfer tokens of all (superOperator rights)." + }, + "symbol()": { + "notice": "An abbreviated name for the tokens" + }, + "totalSupply()": { + "notice": "Gets the total number of tokens in existence." + }, + "transfer(address,uint256)": { + "notice": "Transfer `amount` tokens to `to`." + }, + "transferAndChargeForGas(address,address,uint256,uint256,uint256,uint256,address)": { + "notice": "transfer 1amount1 token from `from` to `to` and charge the gas required to perform that transfer." + }, + "transferFrom(address,address,uint256)": { + "notice": "Transfer `amount` tokens from `from` to `to`." + } + } + } +} diff --git a/packages/deploy/deployments/goerli/.chainId b/packages/deploy/deployments/goerli/.chainId new file mode 100644 index 0000000..7813681 --- /dev/null +++ b/packages/deploy/deployments/goerli/.chainId @@ -0,0 +1 @@ +5 \ No newline at end of file diff --git a/packages/deploy/deployments/mumbai/.chainId b/packages/deploy/deployments/mumbai/.chainId new file mode 100644 index 0000000..e69de29 diff --git a/packages/deploy/deployments/polygon/.chainId b/packages/deploy/deployments/polygon/.chainId new file mode 100644 index 0000000..0973804 --- /dev/null +++ b/packages/deploy/deployments/polygon/.chainId @@ -0,0 +1 @@ +137 \ No newline at end of file diff --git a/packages/deploy/deployments/polygon/CHILD_CHAIN_MANAGER.json b/packages/deploy/deployments/polygon/CHILD_CHAIN_MANAGER.json new file mode 100644 index 0000000..8761597 --- /dev/null +++ b/packages/deploy/deployments/polygon/CHILD_CHAIN_MANAGER.json @@ -0,0 +1,391 @@ +{ + "address": "0xA6FA4fB5f76172d178d61B04b0ecd319C5d1C0aa", + "abi": [ + { + "type": "event", + "name": "RoleAdminChanged", + "inputs": [ + { + "type": "bytes32", + "name": "role", + "internalType": "bytes32", + "indexed": true + }, + { + "type": "bytes32", + "name": "previousAdminRole", + "internalType": "bytes32", + "indexed": true + }, + { + "type": "bytes32", + "name": "newAdminRole", + "internalType": "bytes32", + "indexed": true + } + ], + "anonymous": false + }, + { + "type": "event", + "name": "RoleGranted", + "inputs": [ + { + "type": "bytes32", + "name": "role", + "internalType": "bytes32", + "indexed": true + }, + { + "type": "address", + "name": "account", + "internalType": "address", + "indexed": true + }, + { + "type": "address", + "name": "sender", + "internalType": "address", + "indexed": true + } + ], + "anonymous": false + }, + { + "type": "event", + "name": "RoleRevoked", + "inputs": [ + { + "type": "bytes32", + "name": "role", + "internalType": "bytes32", + "indexed": true + }, + { + "type": "address", + "name": "account", + "internalType": "address", + "indexed": true + }, + { + "type": "address", + "name": "sender", + "internalType": "address", + "indexed": true + } + ], + "anonymous": false + }, + { + "type": "event", + "name": "TokenMapped", + "inputs": [ + { + "type": "address", + "name": "rootToken", + "internalType": "address", + "indexed": true + }, + { + "type": "address", + "name": "childToken", + "internalType": "address", + "indexed": true + } + ], + "anonymous": false + }, + { + "type": "function", + "stateMutability": "view", + "outputs": [ + { + "type": "bytes32", + "name": "", + "internalType": "bytes32" + } + ], + "name": "DEFAULT_ADMIN_ROLE", + "inputs": [] + }, + { + "type": "function", + "stateMutability": "view", + "outputs": [ + { + "type": "bytes32", + "name": "", + "internalType": "bytes32" + } + ], + "name": "DEPOSIT", + "inputs": [] + }, + { + "type": "function", + "stateMutability": "view", + "outputs": [ + { + "type": "bytes32", + "name": "", + "internalType": "bytes32" + } + ], + "name": "MAPPER_ROLE", + "inputs": [] + }, + { + "type": "function", + "stateMutability": "view", + "outputs": [ + { + "type": "bytes32", + "name": "", + "internalType": "bytes32" + } + ], + "name": "MAP_TOKEN", + "inputs": [] + }, + { + "type": "function", + "stateMutability": "view", + "outputs": [ + { + "type": "bytes32", + "name": "", + "internalType": "bytes32" + } + ], + "name": "STATE_SYNCER_ROLE", + "inputs": [] + }, + { + "type": "function", + "stateMutability": "view", + "outputs": [ + { + "type": "address", + "name": "", + "internalType": "address" + } + ], + "name": "childToRootToken", + "inputs": [ + { + "type": "address", + "name": "", + "internalType": "address" + } + ] + }, + { + "type": "function", + "stateMutability": "view", + "outputs": [ + { + "type": "bytes32", + "name": "", + "internalType": "bytes32" + } + ], + "name": "getRoleAdmin", + "inputs": [ + { + "type": "bytes32", + "name": "role", + "internalType": "bytes32" + } + ] + }, + { + "type": "function", + "stateMutability": "view", + "outputs": [ + { + "type": "address", + "name": "", + "internalType": "address" + } + ], + "name": "getRoleMember", + "inputs": [ + { + "type": "bytes32", + "name": "role", + "internalType": "bytes32" + }, + { + "type": "uint256", + "name": "index", + "internalType": "uint256" + } + ] + }, + { + "type": "function", + "stateMutability": "view", + "outputs": [ + { + "type": "uint256", + "name": "", + "internalType": "uint256" + } + ], + "name": "getRoleMemberCount", + "inputs": [ + { + "type": "bytes32", + "name": "role", + "internalType": "bytes32" + } + ] + }, + { + "type": "function", + "stateMutability": "nonpayable", + "outputs": [], + "name": "grantRole", + "inputs": [ + { + "type": "bytes32", + "name": "role", + "internalType": "bytes32" + }, + { + "type": "address", + "name": "account", + "internalType": "address" + } + ] + }, + { + "type": "function", + "stateMutability": "view", + "outputs": [ + { + "type": "bool", + "name": "", + "internalType": "bool" + } + ], + "name": "hasRole", + "inputs": [ + { + "type": "bytes32", + "name": "role", + "internalType": "bytes32" + }, + { + "type": "address", + "name": "account", + "internalType": "address" + } + ] + }, + { + "type": "function", + "stateMutability": "nonpayable", + "outputs": [], + "name": "initialize", + "inputs": [ + { + "type": "address", + "name": "_owner", + "internalType": "address" + } + ] + }, + { + "type": "function", + "stateMutability": "nonpayable", + "outputs": [], + "name": "mapToken", + "inputs": [ + { + "type": "address", + "name": "rootToken", + "internalType": "address" + }, + { + "type": "address", + "name": "childToken", + "internalType": "address" + } + ] + }, + { + "type": "function", + "stateMutability": "nonpayable", + "outputs": [], + "name": "onStateReceive", + "inputs": [ + { + "type": "uint256", + "name": "", + "internalType": "uint256" + }, + { + "type": "bytes", + "name": "data", + "internalType": "bytes" + } + ] + }, + { + "type": "function", + "stateMutability": "nonpayable", + "outputs": [], + "name": "renounceRole", + "inputs": [ + { + "type": "bytes32", + "name": "role", + "internalType": "bytes32" + }, + { + "type": "address", + "name": "account", + "internalType": "address" + } + ] + }, + { + "type": "function", + "stateMutability": "nonpayable", + "outputs": [], + "name": "revokeRole", + "inputs": [ + { + "type": "bytes32", + "name": "role", + "internalType": "bytes32" + }, + { + "type": "address", + "name": "account", + "internalType": "address" + } + ] + }, + { + "type": "function", + "stateMutability": "view", + "outputs": [ + { + "type": "address", + "name": "", + "internalType": "address" + } + ], + "name": "rootToChildToken", + "inputs": [ + { + "type": "address", + "name": "", + "internalType": "address" + } + ] + } + ] +} \ No newline at end of file diff --git a/packages/deploy/deployments/polygon/PolygonSand.json b/packages/deploy/deployments/polygon/PolygonSand.json new file mode 100644 index 0000000..a0a6ead --- /dev/null +++ b/packages/deploy/deployments/polygon/PolygonSand.json @@ -0,0 +1,1086 @@ +{ + "address": "0xBbba073C31bF03b8ACf7c28EF0738DeCF3695683", + "abi": [ + { + "inputs": [ + { + "internalType": "address", + "name": "_childChainManagerProxy", + "type": "address" + }, + { + "internalType": "address", + "name": "trustedForwarder", + "type": "address" + }, + { + "internalType": "address", + "name": "sandAdmin", + "type": "address" + }, + { + "internalType": "address", + "name": "executionAdmin", + "type": "address" + } + ], + "stateMutability": "nonpayable", + "type": "constructor" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "address", + "name": "oldAdmin", + "type": "address" + }, + { + "indexed": false, + "internalType": "address", + "name": "newAdmin", + "type": "address" + } + ], + "name": "AdminChanged", + "type": "event" + }, + { + "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": "previousOwner", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "newOwner", + "type": "address" + } + ], + "name": "OwnershipTransferred", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "address", + "name": "superOperator", + "type": "address" + }, + { + "indexed": false, + "internalType": "bool", + "name": "enabled", + "type": "bool" + } + ], + "name": "SuperOperator", + "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": [ + { + "internalType": "address", + "name": "owner", + "type": "address" + }, + { + "internalType": "address", + "name": "spender", + "type": "address" + }, + { + "internalType": "uint256", + "name": "amountNeeded", + "type": "uint256" + } + ], + "name": "addAllowanceIfNeeded", + "outputs": [ + { + "internalType": "bool", + "name": "success", + "type": "bool" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "owner", + "type": "address" + }, + { + "internalType": "address", + "name": "spender", + "type": "address" + } + ], + "name": "allowance", + "outputs": [ + { + "internalType": "uint256", + "name": "remaining", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "spender", + "type": "address" + }, + { + "internalType": "uint256", + "name": "amount", + "type": "uint256" + } + ], + "name": "approve", + "outputs": [ + { + "internalType": "bool", + "name": "success", + "type": "bool" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "target", + "type": "address" + }, + { + "internalType": "uint256", + "name": "amount", + "type": "uint256" + }, + { + "internalType": "bytes", + "name": "data", + "type": "bytes" + } + ], + "name": "approveAndCall", + "outputs": [ + { + "internalType": "bytes", + "name": "", + "type": "bytes" + } + ], + "stateMutability": "payable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "owner", + "type": "address" + }, + { + "internalType": "address", + "name": "spender", + "type": "address" + }, + { + "internalType": "uint256", + "name": "amount", + "type": "uint256" + } + ], + "name": "approveFor", + "outputs": [ + { + "internalType": "bool", + "name": "success", + "type": "bool" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "owner", + "type": "address" + } + ], + "name": "balanceOf", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "amount", + "type": "uint256" + } + ], + "name": "burn", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "from", + "type": "address" + }, + { + "internalType": "uint256", + "name": "amount", + "type": "uint256" + } + ], + "name": "burnFor", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "newAdmin", + "type": "address" + } + ], + "name": "changeAdmin", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "childChainManagerProxy", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "decimals", + "outputs": [ + { + "internalType": "uint8", + "name": "", + "type": "uint8" + } + ], + "stateMutability": "pure", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "user", + "type": "address" + }, + { + "internalType": "bytes", + "name": "depositData", + "type": "bytes" + } + ], + "name": "deposit", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "getAdmin", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "getTrustedForwarder", + "outputs": [ + { + "internalType": "address", + "name": "trustedForwarder", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "who", + "type": "address" + } + ], + "name": "isSuperOperator", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "forwarder", + "type": "address" + } + ], + "name": "isTrustedForwarder", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "name", + "outputs": [ + { + "internalType": "string", + "name": "", + "type": "string" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "owner", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "target", + "type": "address" + }, + { + "internalType": "uint256", + "name": "amount", + "type": "uint256" + }, + { + "internalType": "bytes", + "name": "data", + "type": "bytes" + } + ], + "name": "paidCall", + "outputs": [ + { + "internalType": "bytes", + "name": "", + "type": "bytes" + } + ], + "stateMutability": "payable", + "type": "function" + }, + { + "inputs": [], + "name": "renounceOwnership", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "superOperator", + "type": "address" + }, + { + "internalType": "bool", + "name": "enabled", + "type": "bool" + } + ], + "name": "setSuperOperator", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "trustedForwarder", + "type": "address" + } + ], + "name": "setTrustedForwarder", + "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": "amount", + "type": "uint256" + } + ], + "name": "transfer", + "outputs": [ + { + "internalType": "bool", + "name": "success", + "type": "bool" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "from", + "type": "address" + }, + { + "internalType": "address", + "name": "to", + "type": "address" + }, + { + "internalType": "uint256", + "name": "amount", + "type": "uint256" + } + ], + "name": "transferFrom", + "outputs": [ + { + "internalType": "bool", + "name": "success", + "type": "bool" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "newOwner", + "type": "address" + } + ], + "name": "transferOwnership", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "newChildChainManagerProxy", + "type": "address" + } + ], + "name": "updateChildChainManager", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "amount", + "type": "uint256" + } + ], + "name": "withdraw", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + } + ], + "transactionHash": "0x35149dc6772540aae831f537f17cc7bee9fb12bbe02af7ac208b26a406b297eb", + "receipt": { + "to": null, + "from": "0x7074BB056C53ACC0b6091dd3FAe591aa3A4acC88", + "contractAddress": "0xBbba073C31bF03b8ACf7c28EF0738DeCF3695683", + "transactionIndex": 12, + "gasUsed": "1840138", + "logsBloom": "0x0000000000000000000000000000000000000000000000000080000040000000000000000000000002000000000000000000a000000000000000000000000000000000000000000000000000000000800001000000000000200100000000000000000000020000000000000000000800000000000000000080000000000000400000000000000000000000000000000000008000000000000000000000000000200000000000000000000000000000000000000000000000000000000000004000000000000000000081000008000000000000000000000000100000000020000000000000000000000000000000000000000800000000000000000200100000", + "blockHash": "0xc743419ba0f79c173aea1dff3ae4415b265fb7866aa4c721ff04e8b102ea9e8d", + "transactionHash": "0x35149dc6772540aae831f537f17cc7bee9fb12bbe02af7ac208b26a406b297eb", + "logs": [ + { + "transactionIndex": 12, + "blockNumber": 20971624, + "transactionHash": "0x35149dc6772540aae831f537f17cc7bee9fb12bbe02af7ac208b26a406b297eb", + "address": "0xBbba073C31bF03b8ACf7c28EF0738DeCF3695683", + "topics": [ + "0x8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0", + "0x0000000000000000000000000000000000000000000000000000000000000000", + "0x0000000000000000000000007074bb056c53acc0b6091dd3fae591aa3a4acc88" + ], + "data": "0x", + "logIndex": 64, + "blockHash": "0xc743419ba0f79c173aea1dff3ae4415b265fb7866aa4c721ff04e8b102ea9e8d" + }, + { + "transactionIndex": 12, + "blockNumber": 20971624, + "transactionHash": "0x35149dc6772540aae831f537f17cc7bee9fb12bbe02af7ac208b26a406b297eb", + "address": "0x0000000000000000000000000000000000001010", + "topics": [ + "0x4dfe1bbbcf077ddc3e01291eea2d5c70c2b422b415d95645b9adcfd678cb1d63", + "0x0000000000000000000000000000000000000000000000000000000000001010", + "0x0000000000000000000000007074bb056c53acc0b6091dd3fae591aa3a4acc88", + "0x000000000000000000000000e7e2cb8c81c10ff191a73fe266788c9ce62ec754" + ], + "data": "0x00000000000000000000000000000000000000000000000001262fcf2c3f14000000000000000000000000000000000000000000000000056a463ab6658c0800000000000000000000000000000000000000000000000217df797dc9d8d59be100000000000000000000000000000000000000000000000569200ae7394cf400000000000000000000000000000000000000000000000217e09fad990514afe1", + "logIndex": 65, + "blockHash": "0xc743419ba0f79c173aea1dff3ae4415b265fb7866aa4c721ff04e8b102ea9e8d" + } + ], + "blockNumber": 20971624, + "cumulativeGasUsed": "3568879", + "status": 1, + "byzantium": true + }, + "args": [ + "0xA6FA4fB5f76172d178d61B04b0ecd319C5d1C0aa", + "0x86C80a8aa58e0A4fa09A69624c31Ab2a6CAD56b8", + "0xe75Ce341C98400a45F579e32C95fF49681Fc93fa", + "0xe75Ce341C98400a45F579e32C95fF49681Fc93fa" + ], + "solcInputHash": "35e4e3eae2a7486f84ff501e73c5af93", + "metadata": "{\"compiler\":{\"version\":\"0.8.2+commit.661d1103\"},\"language\":\"Solidity\",\"output\":{\"abi\":[{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_childChainManagerProxy\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"trustedForwarder\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"sandAdmin\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"executionAdmin\",\"type\":\"address\"}],\"stateMutability\":\"nonpayable\",\"type\":\"constructor\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"address\",\"name\":\"oldAdmin\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"address\",\"name\":\"newAdmin\",\"type\":\"address\"}],\"name\":\"AdminChanged\",\"type\":\"event\"},{\"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\":\"previousOwner\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"newOwner\",\"type\":\"address\"}],\"name\":\"OwnershipTransferred\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"address\",\"name\":\"superOperator\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"bool\",\"name\":\"enabled\",\"type\":\"bool\"}],\"name\":\"SuperOperator\",\"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\":[{\"internalType\":\"address\",\"name\":\"owner\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"spender\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"amountNeeded\",\"type\":\"uint256\"}],\"name\":\"addAllowanceIfNeeded\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"success\",\"type\":\"bool\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"owner\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"spender\",\"type\":\"address\"}],\"name\":\"allowance\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"remaining\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"spender\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"name\":\"approve\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"success\",\"type\":\"bool\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"target\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"},{\"internalType\":\"bytes\",\"name\":\"data\",\"type\":\"bytes\"}],\"name\":\"approveAndCall\",\"outputs\":[{\"internalType\":\"bytes\",\"name\":\"\",\"type\":\"bytes\"}],\"stateMutability\":\"payable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"owner\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"spender\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"name\":\"approveFor\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"success\",\"type\":\"bool\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"owner\",\"type\":\"address\"}],\"name\":\"balanceOf\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"name\":\"burn\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"from\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"name\":\"burnFor\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"newAdmin\",\"type\":\"address\"}],\"name\":\"changeAdmin\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"childChainManagerProxy\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"decimals\",\"outputs\":[{\"internalType\":\"uint8\",\"name\":\"\",\"type\":\"uint8\"}],\"stateMutability\":\"pure\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"user\",\"type\":\"address\"},{\"internalType\":\"bytes\",\"name\":\"depositData\",\"type\":\"bytes\"}],\"name\":\"deposit\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"getAdmin\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"getTrustedForwarder\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"trustedForwarder\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"who\",\"type\":\"address\"}],\"name\":\"isSuperOperator\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"forwarder\",\"type\":\"address\"}],\"name\":\"isTrustedForwarder\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"name\",\"outputs\":[{\"internalType\":\"string\",\"name\":\"\",\"type\":\"string\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"owner\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"target\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"},{\"internalType\":\"bytes\",\"name\":\"data\",\"type\":\"bytes\"}],\"name\":\"paidCall\",\"outputs\":[{\"internalType\":\"bytes\",\"name\":\"\",\"type\":\"bytes\"}],\"stateMutability\":\"payable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"renounceOwnership\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"superOperator\",\"type\":\"address\"},{\"internalType\":\"bool\",\"name\":\"enabled\",\"type\":\"bool\"}],\"name\":\"setSuperOperator\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"trustedForwarder\",\"type\":\"address\"}],\"name\":\"setTrustedForwarder\",\"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\":\"amount\",\"type\":\"uint256\"}],\"name\":\"transfer\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"success\",\"type\":\"bool\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"from\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"name\":\"transferFrom\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"success\",\"type\":\"bool\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"newOwner\",\"type\":\"address\"}],\"name\":\"transferOwnership\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"newChildChainManagerProxy\",\"type\":\"address\"}],\"name\":\"updateChildChainManager\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"name\":\"withdraw\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"}],\"devdoc\":{\"kind\":\"dev\",\"methods\":{\"addAllowanceIfNeeded(address,address,uint256)\":{\"params\":{\"amountNeeded\":\"The amount requested to spend\",\"owner\":\"The address of the owner of the tokens\",\"spender\":\"The address wanting to spend tokens\"},\"returns\":{\"success\":\"Whether or not the call succeeded.\"}},\"allowance(address,address)\":{\"params\":{\"owner\":\"The address whose token is allowed.\",\"spender\":\"The address allowed to transfer.\"},\"returns\":{\"remaining\":\"The amount of token `spender` is allowed to transfer on behalf of `owner`.\"}},\"approve(address,uint256)\":{\"params\":{\"amount\":\"The number of tokens allowed.\",\"spender\":\"The address to be given rights to transfer.\"},\"returns\":{\"success\":\"Whether or not the call succeeded.\"}},\"approveAndCall(address,uint256,bytes)\":{\"params\":{\"amount\":\"The number of tokens allowed.\",\"data\":\"The bytes for the call.\",\"target\":\"The address to be given rights to transfer and destination of the call.\"},\"returns\":{\"_0\":\"The data of the call.\"}},\"approveFor(address,address,uint256)\":{\"params\":{\"amount\":\"The number of tokens allowed.\",\"owner\":\"The address whose token is allowed.\",\"spender\":\"The address to be given rights to transfer.\"},\"returns\":{\"success\":\"Whether or not the call succeeded.\"}},\"balanceOf(address)\":{\"params\":{\"owner\":\"The address to query the balance of.\"},\"returns\":{\"_0\":\"The amount owned by `owner`.\"}},\"burn(uint256)\":{\"params\":{\"amount\":\"The number of tokens to burn.\"}},\"burnFor(address,uint256)\":{\"params\":{\"amount\":\"The number of tokens to burn.\",\"from\":\"The address whose token to burn.\"}},\"changeAdmin(address)\":{\"details\":\"Change the administrator to be `newAdmin`.\",\"params\":{\"newAdmin\":\"The address of the new administrator.\"}},\"decimals()\":{\"returns\":{\"_0\":\"The number of decimals.\"}},\"deposit(address,bytes)\":{\"params\":{\"depositData\":\"abi encoded amount\",\"user\":\"user address for whom deposit is being done\"}},\"getAdmin()\":{\"details\":\"Get the current administrator of this contract.\",\"returns\":{\"_0\":\"The current administrator of this contract.\"}},\"isSuperOperator(address)\":{\"params\":{\"who\":\"The address to query.\"},\"returns\":{\"_0\":\"whether the address has superOperator rights.\"}},\"name()\":{\"returns\":{\"_0\":\"The name of the token collection.\"}},\"owner()\":{\"details\":\"Returns the address of the current owner.\"},\"paidCall(address,uint256,bytes)\":{\"params\":{\"amount\":\"The number of tokens allowed to spend.\",\"data\":\"The bytes for the call.\",\"target\":\"The destination of the call, allowed to spend the amount specified\"},\"returns\":{\"_0\":\"The data of the call.\"}},\"renounceOwnership()\":{\"details\":\"Leaves the contract without owner. It will not be possible to call `onlyOwner` functions anymore. Can only be called by the current owner. NOTE: Renouncing ownership will leave the contract without an owner, thereby removing any functionality that is only available to the owner.\"},\"setSuperOperator(address,bool)\":{\"params\":{\"enabled\":\"set whether the superOperator is enabled or disabled.\",\"superOperator\":\"address that will be given/removed superOperator right.\"}},\"symbol()\":{\"returns\":{\"_0\":\"The symbol of the token collection.\"}},\"totalSupply()\":{\"returns\":{\"_0\":\"The total number of tokens in existence.\"}},\"transfer(address,uint256)\":{\"params\":{\"amount\":\"The number of tokens being transfered.\",\"to\":\"The recipient address of the tokens being transfered.\"},\"returns\":{\"success\":\"Whether or not the transfer succeeded.\"}},\"transferFrom(address,address,uint256)\":{\"params\":{\"amount\":\"The number of tokens transfered.\",\"from\":\"The origin address of the tokens being transferred.\",\"to\":\"The recipient address of the tokensbeing transfered.\"},\"returns\":{\"success\":\"Whether or not the transfer succeeded.\"}},\"transferOwnership(address)\":{\"details\":\"Transfers ownership of the contract to a new account (`newOwner`). Can only be called by the current owner.\"},\"updateChildChainManager(address)\":{\"params\":{\"newChildChainManagerProxy\":\"address of the new childChainManagerProxy\"}},\"withdraw(uint256)\":{\"details\":\"Should burn user's tokens. This transaction will be verified when exiting on root chain\",\"params\":{\"amount\":\"amount to withdraw\"}}},\"version\":1},\"userdoc\":{\"events\":{\"Approval(address,address,uint256)\":{\"notice\":\"emitted when owner grant transfer rights to another address\"},\"Transfer(address,address,uint256)\":{\"notice\":\"emitted when tokens are transfered from one address to another.\"}},\"kind\":\"user\",\"methods\":{\"addAllowanceIfNeeded(address,address,uint256)\":{\"notice\":\"Increase the allowance for the spender if needed\"},\"allowance(address,address)\":{\"notice\":\"Get the allowance of `spender` for `owner`'s tokens.\"},\"approve(address,uint256)\":{\"notice\":\"Approve `spender` to transfer `amount` tokens.\"},\"approveAndCall(address,uint256,bytes)\":{\"notice\":\"Approve `target` to spend `amount` and call it with data.\"},\"approveFor(address,address,uint256)\":{\"notice\":\"Approve `spender` to transfer `amount` tokens from `owner`.\"},\"balanceOf(address)\":{\"notice\":\"Get the balance of `owner`.\"},\"burn(uint256)\":{\"notice\":\"Burn `amount` tokens.\"},\"burnFor(address,uint256)\":{\"notice\":\"Burn `amount` tokens from `owner`.\"},\"decimals()\":{\"notice\":\"Get the number of decimals for the token collection.\"},\"deposit(address,bytes)\":{\"notice\":\"called when tokens are deposited on root chain\"},\"isSuperOperator(address)\":{\"notice\":\"check whether address `who` is given superOperator rights.\"},\"name()\":{\"notice\":\"Get the name of the token collection.\"},\"paidCall(address,uint256,bytes)\":{\"notice\":\"Temporarily approve `target` to spend `amount` and call it with data. Previous approvals remains unchanged.\"},\"setSuperOperator(address,bool)\":{\"notice\":\"Enable or disable the ability of `superOperator` to transfer tokens of all (superOperator rights).\"},\"symbol()\":{\"notice\":\"Get the symbol for the token collection.\"},\"totalSupply()\":{\"notice\":\"Get the total number of tokens in existence.\"},\"transfer(address,uint256)\":{\"notice\":\"Transfer `amount` tokens to `to`.\"},\"transferFrom(address,address,uint256)\":{\"notice\":\"Transfer `amount` tokens from `from` to `to`.\"},\"updateChildChainManager(address)\":{\"notice\":\"update the ChildChainManager Proxy address\"},\"withdraw(uint256)\":{\"notice\":\"called when user wants to withdraw tokens back to root chain\"}},\"version\":1}},\"settings\":{\"compilationTarget\":{\"src/solc_0.8/polygon/child/sand/PolygonSand.sol\":\"PolygonSand\"},\"evmVersion\":\"istanbul\",\"libraries\":{},\"metadata\":{\"bytecodeHash\":\"ipfs\",\"useLiteralContent\":true},\"optimizer\":{\"enabled\":true,\"runs\":2000},\"remappings\":[]},\"sources\":{\"@openzeppelin/contracts-0.8/access/Ownable.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity ^0.8.0;\\n\\nimport \\\"../utils/Context.sol\\\";\\n/**\\n * @dev Contract module which provides a basic access control mechanism, where\\n * there is an account (an owner) that can be granted exclusive access to\\n * specific functions.\\n *\\n * By default, the owner account will be the one that deploys the contract. This\\n * can later be changed with {transferOwnership}.\\n *\\n * This module is used through inheritance. It will make available the modifier\\n * `onlyOwner`, which can be applied to your functions to restrict their use to\\n * the owner.\\n */\\nabstract contract Ownable is Context {\\n address private _owner;\\n\\n event OwnershipTransferred(address indexed previousOwner, address indexed newOwner);\\n\\n /**\\n * @dev Initializes the contract setting the deployer as the initial owner.\\n */\\n constructor () {\\n address msgSender = _msgSender();\\n _owner = msgSender;\\n emit OwnershipTransferred(address(0), msgSender);\\n }\\n\\n /**\\n * @dev Returns the address of the current owner.\\n */\\n function owner() public view virtual returns (address) {\\n return _owner;\\n }\\n\\n /**\\n * @dev Throws if called by any account other than the owner.\\n */\\n modifier onlyOwner() {\\n require(owner() == _msgSender(), \\\"Ownable: caller is not the owner\\\");\\n _;\\n }\\n\\n /**\\n * @dev Leaves the contract without owner. It will not be possible to call\\n * `onlyOwner` functions anymore. Can only be called by the current owner.\\n *\\n * NOTE: Renouncing ownership will leave the contract without an owner,\\n * thereby removing any functionality that is only available to the owner.\\n */\\n function renounceOwnership() public virtual onlyOwner {\\n emit OwnershipTransferred(_owner, address(0));\\n _owner = address(0);\\n }\\n\\n /**\\n * @dev Transfers ownership of the contract to a new account (`newOwner`).\\n * Can only be called by the current owner.\\n */\\n function transferOwnership(address newOwner) public virtual onlyOwner {\\n require(newOwner != address(0), \\\"Ownable: new owner is the zero address\\\");\\n emit OwnershipTransferred(_owner, newOwner);\\n _owner = newOwner;\\n }\\n}\\n\",\"keccak256\":\"0x1cae4f85f114ff17b90414f5da67365b1d00337abb5bce9bf944eb78a2c0673c\",\"license\":\"MIT\"},\"@openzeppelin/contracts-0.8/utils/Context.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity ^0.8.0;\\n\\n/*\\n * @dev Provides information about the current execution context, including the\\n * sender of the transaction and its data. While these are generally available\\n * via msg.sender and msg.data, they should not be accessed in such a direct\\n * manner, since when dealing with meta-transactions the account sending and\\n * paying for execution may not be the actual sender (as far as an application\\n * is concerned).\\n *\\n * This contract is only required for intermediate, library-like contracts.\\n */\\nabstract contract Context {\\n function _msgSender() internal view virtual returns (address) {\\n return msg.sender;\\n }\\n\\n function _msgData() internal view virtual returns (bytes calldata) {\\n this; // silence state mutability warning without generating bytecode - see https://github.com/ethereum/solidity/issues/2691\\n return msg.data;\\n }\\n}\\n\",\"keccak256\":\"0xf930d2df426bfcfc1f7415be724f04081c96f4fb9ec8d0e3a521c07692dface0\",\"license\":\"MIT\"},\"src/solc_0.8/Sand/SandBaseToken.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity 0.8.2;\\n\\nimport \\\"../common/BaseWithStorage/ERC20/extensions/ERC20BasicApproveExtension.sol\\\";\\nimport \\\"../common/BaseWithStorage/ERC20/ERC20BaseToken.sol\\\";\\n\\ncontract SandBaseToken is ERC20BaseToken, ERC20BasicApproveExtension {\\n constructor(\\n address sandAdmin,\\n address executionAdmin,\\n address beneficiary,\\n uint256 amount\\n ) ERC20BaseToken(\\\"SAND\\\", \\\"SAND\\\", sandAdmin, executionAdmin) {\\n _admin = sandAdmin;\\n if (beneficiary != address(0)) {\\n uint256 initialSupply = amount * (1 ether);\\n _mint(beneficiary, initialSupply);\\n }\\n }\\n}\\n\",\"keccak256\":\"0xb67dbd45097e8865fa4fb909a338a0ab1ca43cb184cad29f6ac53d67f97a8c36\",\"license\":\"MIT\"},\"src/solc_0.8/common/BaseWithStorage/ERC20/ERC20BaseToken.sol\":{\"content\":\"//SPDX-License-Identifier: MIT\\npragma solidity 0.8.2;\\n\\nimport \\\"@openzeppelin/contracts-0.8/utils/Context.sol\\\";\\nimport \\\"./extensions/ERC20Internal.sol\\\";\\nimport \\\"../../interfaces/IERC20Extended.sol\\\";\\nimport \\\"../WithSuperOperators.sol\\\";\\n\\nabstract contract ERC20BaseToken is WithSuperOperators, IERC20, IERC20Extended, ERC20Internal, Context {\\n string internal _name;\\n string internal _symbol;\\n address internal immutable _operator;\\n uint256 internal _totalSupply;\\n mapping(address => uint256) internal _balances;\\n mapping(address => mapping(address => uint256)) internal _allowances;\\n\\n constructor(\\n string memory tokenName,\\n string memory tokenSymbol,\\n address admin,\\n address operator\\n ) {\\n _name = tokenName;\\n _symbol = tokenSymbol;\\n _admin = admin;\\n _operator = operator;\\n }\\n\\n /// @notice Transfer `amount` tokens to `to`.\\n /// @param to The recipient address of the tokens being transfered.\\n /// @param amount The number of tokens being transfered.\\n /// @return success Whether or not the transfer succeeded.\\n function transfer(address to, uint256 amount) external override returns (bool success) {\\n _transfer(_msgSender(), to, amount);\\n return true;\\n }\\n\\n /// @notice Transfer `amount` tokens from `from` to `to`.\\n /// @param from The origin address of the tokens being transferred.\\n /// @param to The recipient address of the tokensbeing transfered.\\n /// @param amount The number of tokens transfered.\\n /// @return success Whether or not the transfer succeeded.\\n function transferFrom(\\n address from,\\n address to,\\n uint256 amount\\n ) external override returns (bool success) {\\n if (_msgSender() != from && !_superOperators[_msgSender()] && _msgSender() != _operator) {\\n uint256 currentAllowance = _allowances[from][_msgSender()];\\n if (currentAllowance != ~uint256(0)) {\\n // save gas when allowance is maximal by not reducing it (see https://github.com/ethereum/EIPs/issues/717)\\n require(currentAllowance >= amount, \\\"NOT_AUTHORIZED_ALLOWANCE\\\");\\n _allowances[from][_msgSender()] = currentAllowance - amount;\\n }\\n }\\n _transfer(from, to, amount);\\n return true;\\n }\\n\\n /// @notice Burn `amount` tokens.\\n /// @param amount The number of tokens to burn.\\n function burn(uint256 amount) external override {\\n _burn(_msgSender(), amount);\\n }\\n\\n /// @notice Burn `amount` tokens from `owner`.\\n /// @param from The address whose token to burn.\\n /// @param amount The number of tokens to burn.\\n function burnFor(address from, uint256 amount) external override {\\n _burn(from, amount);\\n }\\n\\n /// @notice Approve `spender` to transfer `amount` tokens.\\n /// @param spender The address to be given rights to transfer.\\n /// @param amount The number of tokens allowed.\\n /// @return success Whether or not the call succeeded.\\n function approve(address spender, uint256 amount) external override returns (bool success) {\\n _approveFor(_msgSender(), spender, amount);\\n return true;\\n }\\n\\n /// @notice Get the name of the token collection.\\n /// @return The name of the token collection.\\n function name() external view virtual returns (string memory) {\\n //added virtual\\n return _name;\\n }\\n\\n /// @notice Get the symbol for the token collection.\\n /// @return The symbol of the token collection.\\n function symbol() external view virtual returns (string memory) {\\n //added virtual\\n return _symbol;\\n }\\n\\n /// @notice Get the total number of tokens in existence.\\n /// @return The total number of tokens in existence.\\n function totalSupply() external view override returns (uint256) {\\n return _totalSupply;\\n }\\n\\n /// @notice Get the balance of `owner`.\\n /// @param owner The address to query the balance of.\\n /// @return The amount owned by `owner`.\\n function balanceOf(address owner) external view override returns (uint256) {\\n return _balances[owner];\\n }\\n\\n /// @notice Get the allowance of `spender` for `owner`'s tokens.\\n /// @param owner The address whose token is allowed.\\n /// @param spender The address allowed to transfer.\\n /// @return remaining The amount of token `spender` is allowed to transfer on behalf of `owner`.\\n function allowance(address owner, address spender) external view override returns (uint256 remaining) {\\n return _allowances[owner][spender];\\n }\\n\\n /// @notice Get the number of decimals for the token collection.\\n /// @return The number of decimals.\\n function decimals() external pure virtual returns (uint8) {\\n return uint8(18);\\n }\\n\\n /// @notice Approve `spender` to transfer `amount` tokens from `owner`.\\n /// @param owner The address whose token is allowed.\\n /// @param spender The address to be given rights to transfer.\\n /// @param amount The number of tokens allowed.\\n /// @return success Whether or not the call succeeded.\\n function approveFor(\\n address owner,\\n address spender,\\n uint256 amount\\n ) public override returns (bool success) {\\n require(_msgSender() == owner || _superOperators[_msgSender()] || _msgSender() == _operator, \\\"NOT_AUTHORIZED\\\");\\n _approveFor(owner, spender, amount);\\n return true;\\n }\\n\\n /// @notice Increase the allowance for the spender if needed\\n /// @param owner The address of the owner of the tokens\\n /// @param spender The address wanting to spend tokens\\n /// @param amountNeeded The amount requested to spend\\n /// @return success Whether or not the call succeeded.\\n function addAllowanceIfNeeded(\\n address owner,\\n address spender,\\n uint256 amountNeeded\\n ) public returns (bool success) {\\n require(_msgSender() == owner || _superOperators[_msgSender()] || _msgSender() == _operator, \\\"INVALID_SENDER\\\");\\n _addAllowanceIfNeeded(owner, spender, amountNeeded);\\n return true;\\n }\\n\\n /// @dev See addAllowanceIfNeeded.\\n function _addAllowanceIfNeeded(\\n address owner,\\n address spender,\\n uint256 amountNeeded /*(ERC20Internal, ERC20ExecuteExtension, ERC20BasicApproveExtension)*/\\n ) internal virtual override {\\n if (amountNeeded > 0 && !isSuperOperator(spender) && spender != _operator) {\\n uint256 currentAllowance = _allowances[owner][spender];\\n if (currentAllowance < amountNeeded) {\\n _approveFor(owner, spender, amountNeeded);\\n }\\n }\\n }\\n\\n /// @dev See approveFor.\\n function _approveFor(\\n address owner,\\n address spender,\\n uint256 amount /*(ERC20BasicApproveExtension, ERC20Internal)*/\\n ) internal virtual override {\\n require(owner != address(0) && spender != address(0), \\\"INVALID_OWNER_||_SPENDER\\\");\\n _allowances[owner][spender] = amount;\\n emit Approval(owner, spender, amount);\\n }\\n\\n /// @dev See transfer.\\n function _transfer(\\n address from,\\n address to,\\n uint256 amount /*(ERC20Internal, ERC20ExecuteExtension)*/\\n ) internal virtual override {\\n require(to != address(0), \\\"NOT_TO_ZEROADDRESS\\\");\\n require(to != address(this), \\\"NOT_TO_THIS\\\");\\n uint256 currentBalance = _balances[from];\\n require(currentBalance >= amount, \\\"INSUFFICIENT_FUNDS\\\");\\n _balances[from] = currentBalance - amount;\\n _balances[to] += amount;\\n emit Transfer(from, to, amount);\\n }\\n\\n /// @dev Mint tokens for a recipient.\\n /// @param to The recipient address.\\n /// @param amount The number of token to mint.\\n function _mint(address to, uint256 amount) internal {\\n require(to != address(0), \\\"NOT_TO_ZEROADDRESS\\\");\\n require(amount > 0, \\\"MINT_O_TOKENS\\\");\\n uint256 currentTotalSupply = _totalSupply;\\n uint256 newTotalSupply = currentTotalSupply + amount;\\n require(newTotalSupply > currentTotalSupply, \\\"OVERFLOW\\\");\\n _totalSupply = newTotalSupply;\\n _balances[to] += amount;\\n emit Transfer(address(0), to, amount);\\n }\\n\\n /// @dev Burn tokens from an address.\\n /// @param from The address whose tokens to burn.\\n /// @param amount The number of token to burn.\\n function _burn(address from, uint256 amount) internal {\\n require(amount > 0, \\\"BURN_O_TOKENS\\\");\\n if (_msgSender() != from && !_superOperators[_msgSender()] && _msgSender() != _operator) {\\n uint256 currentAllowance = _allowances[from][_msgSender()];\\n if (currentAllowance != ~uint256(0)) {\\n // save gas when allowance is maximal by not reducing it (see https://github.com/ethereum/EIPs/issues/717)\\n require(currentAllowance >= amount, \\\"INSUFFICIENT_ALLOWANCE\\\");\\n _allowances[from][_msgSender()] = currentAllowance - amount;\\n }\\n }\\n\\n uint256 currentBalance = _balances[from];\\n require(currentBalance >= amount, \\\"INSUFFICIENT_FUNDS\\\");\\n _balances[from] = currentBalance - amount;\\n _totalSupply -= amount;\\n emit Transfer(from, address(0), amount);\\n }\\n}\\n\",\"keccak256\":\"0x21abee15baa9d3ba0016b24e3dce6eb47020edc57cfcc92eb24bc554939eaad9\",\"license\":\"MIT\"},\"src/solc_0.8/common/BaseWithStorage/ERC20/extensions/ERC20BasicApproveExtension.sol\":{\"content\":\"//SPDX-License-Identifier: MIT\\n\\npragma solidity 0.8.2;\\n\\nimport \\\"@openzeppelin/contracts-0.8/utils/Context.sol\\\";\\nimport \\\"./ERC20Internal.sol\\\";\\nimport \\\"../../../Libraries/BytesUtil.sol\\\";\\n\\nabstract contract ERC20BasicApproveExtension is ERC20Internal, Context {\\n /// @notice Approve `target` to spend `amount` and call it with data.\\n /// @param target The address to be given rights to transfer and destination of the call.\\n /// @param amount The number of tokens allowed.\\n /// @param data The bytes for the call.\\n /// @return The data of the call.\\n function approveAndCall(\\n address target,\\n uint256 amount,\\n bytes calldata data\\n ) external payable returns (bytes memory) {\\n require(BytesUtil.doFirstParamEqualsAddress(data, _msgSender()), \\\"FIRST_PARAM_NOT_SENDER\\\");\\n\\n _approveFor(_msgSender(), target, amount);\\n\\n // solhint-disable-next-line avoid-low-level-calls\\n (bool success, bytes memory returnData) = target.call{value: msg.value}(data);\\n require(success, string(returnData));\\n return returnData;\\n }\\n\\n /// @notice Temporarily approve `target` to spend `amount` and call it with data.\\n /// Previous approvals remains unchanged.\\n /// @param target The destination of the call, allowed to spend the amount specified\\n /// @param amount The number of tokens allowed to spend.\\n /// @param data The bytes for the call.\\n /// @return The data of the call.\\n function paidCall(\\n address target,\\n uint256 amount,\\n bytes calldata data\\n ) external payable returns (bytes memory) {\\n require(BytesUtil.doFirstParamEqualsAddress(data, _msgSender()), \\\"FIRST_PARAM_NOT_SENDER\\\");\\n\\n if (amount > 0) {\\n _addAllowanceIfNeeded(_msgSender(), target, amount);\\n }\\n\\n // solhint-disable-next-line avoid-low-level-calls\\n (bool success, bytes memory returnData) = target.call{value: msg.value}(data);\\n require(success, string(returnData));\\n\\n return returnData;\\n }\\n}\\n\",\"keccak256\":\"0x6c61a828b720af37167a9ca7f914a5ba3fd02d6846ac2304f1a844f12032ba2a\",\"license\":\"MIT\"},\"src/solc_0.8/common/BaseWithStorage/ERC20/extensions/ERC20Internal.sol\":{\"content\":\"//SPDX-License-Identifier: MIT\\npragma solidity 0.8.2;\\n\\nabstract contract ERC20Internal {\\n function _approveFor(\\n address owner,\\n address target,\\n uint256 amount\\n ) internal virtual;\\n\\n function _addAllowanceIfNeeded(\\n address owner,\\n address spender,\\n uint256 amountNeeded\\n ) internal virtual;\\n\\n function _transfer(\\n address from,\\n address to,\\n uint256 amount\\n ) internal virtual;\\n}\\n\",\"keccak256\":\"0x016db35dc3c8fad3cedc08f3152e3b90b7adb4d961c5ac08c03106e18535d10e\",\"license\":\"MIT\"},\"src/solc_0.8/common/BaseWithStorage/ERC2771Handler.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// solhint-disable-next-line compiler-version\\npragma solidity ^0.8.0;\\n\\n/// @dev minimal ERC2771 handler to keep bytecode-size down.\\n/// based on: https://github.com/OpenZeppelin/openzeppelin-contracts/blob/master/contracts/metatx/ERC2771Context.sol\\n\\ncontract ERC2771Handler {\\n address internal _trustedForwarder;\\n\\n function __ERC2771Handler_initialize(address forwarder) internal {\\n _trustedForwarder = forwarder;\\n }\\n\\n function isTrustedForwarder(address forwarder) public view returns (bool) {\\n return forwarder == _trustedForwarder;\\n }\\n\\n function getTrustedForwarder() external view returns (address trustedForwarder) {\\n return _trustedForwarder;\\n }\\n\\n function _msgSender() internal view virtual returns (address sender) {\\n if (isTrustedForwarder(msg.sender)) {\\n // The assembly code is more direct than the Solidity version using `abi.decode`.\\n // solhint-disable-next-line no-inline-assembly\\n assembly {\\n sender := shr(96, calldataload(sub(calldatasize(), 20)))\\n }\\n } else {\\n return msg.sender;\\n }\\n }\\n\\n function _msgData() internal view virtual returns (bytes calldata) {\\n if (isTrustedForwarder(msg.sender)) {\\n return msg.data[:msg.data.length - 20];\\n } else {\\n return msg.data;\\n }\\n }\\n}\\n\",\"keccak256\":\"0x9b78a86fc419fc78e618cb6c7892c2c66c4d4a9cac7848d33d91d68aab755caa\",\"license\":\"MIT\"},\"src/solc_0.8/common/BaseWithStorage/WithAdmin.sol\":{\"content\":\"//SPDX-License-Identifier: MIT\\n// solhint-disable-next-line compiler-version\\npragma solidity 0.8.2;\\n\\ncontract WithAdmin {\\n address internal _admin;\\n\\n /// @dev Emits when the contract administrator is changed.\\n /// @param oldAdmin The address of the previous administrator.\\n /// @param newAdmin The address of the new administrator.\\n event AdminChanged(address oldAdmin, address newAdmin);\\n\\n modifier onlyAdmin() {\\n require(msg.sender == _admin, \\\"ADMIN_ONLY\\\");\\n _;\\n }\\n\\n /// @dev Get the current administrator of this contract.\\n /// @return The current administrator of this contract.\\n function getAdmin() external view returns (address) {\\n return _admin;\\n }\\n\\n /// @dev Change the administrator to be `newAdmin`.\\n /// @param newAdmin The address of the new administrator.\\n function changeAdmin(address newAdmin) external {\\n require(msg.sender == _admin, \\\"ADMIN_ACCESS_DENIED\\\");\\n emit AdminChanged(_admin, newAdmin);\\n _admin = newAdmin;\\n }\\n}\\n\",\"keccak256\":\"0xf2ce40f1b23052a50a5b2d5ad61fbc04ab6c9fb2e5b1dba17ccddf4507e4649f\",\"license\":\"MIT\"},\"src/solc_0.8/common/BaseWithStorage/WithSuperOperators.sol\":{\"content\":\"//SPDX-License-Identifier: MIT\\n// solhint-disable-next-line compiler-version\\npragma solidity 0.8.2;\\n\\nimport \\\"./WithAdmin.sol\\\";\\n\\ncontract WithSuperOperators is WithAdmin {\\n mapping(address => bool) internal _superOperators;\\n\\n event SuperOperator(address superOperator, bool enabled);\\n\\n /// @notice Enable or disable the ability of `superOperator` to transfer tokens of all (superOperator rights).\\n /// @param superOperator address that will be given/removed superOperator right.\\n /// @param enabled set whether the superOperator is enabled or disabled.\\n function setSuperOperator(address superOperator, bool enabled) external {\\n require(msg.sender == _admin, \\\"only admin is allowed to add super operators\\\");\\n _superOperators[superOperator] = enabled;\\n emit SuperOperator(superOperator, enabled);\\n }\\n\\n /// @notice check whether address `who` is given superOperator rights.\\n /// @param who The address to query.\\n /// @return whether the address has superOperator rights.\\n function isSuperOperator(address who) public view returns (bool) {\\n return _superOperators[who];\\n }\\n}\\n\",\"keccak256\":\"0xa0d9b0e08ccae5e6b1f56e41ef750a68686d8958bc398369ac283aa4440f87ab\",\"license\":\"MIT\"},\"src/solc_0.8/common/Libraries/BytesUtil.sol\":{\"content\":\"//SPDX-License-Identifier: MIT\\npragma solidity 0.8.2;\\n\\nlibrary BytesUtil {\\n uint256 private constant DATA_MIN_LENGTH = 68;\\n\\n /// @dev Check if the data == _address.\\n /// @param data The bytes passed to the function.\\n /// @param _address The address to compare to.\\n /// @return Whether the first param == _address.\\n function doFirstParamEqualsAddress(bytes memory data, address _address) internal pure returns (bool) {\\n if (data.length < DATA_MIN_LENGTH) {\\n return false;\\n }\\n uint256 value;\\n // solhint-disable-next-line no-inline-assembly\\n assembly {\\n value := mload(add(data, 36))\\n }\\n return value == uint256(uint160(_address));\\n }\\n}\\n\",\"keccak256\":\"0x3a7bfc1ad1fb8d784691a344ba752ca5591136bec45c63065256a9332ddd5cee\",\"license\":\"MIT\"},\"src/solc_0.8/common/interfaces/IERC20.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity 0.8.2;\\n\\n/// @dev see https://eips.ethereum.org/EIPS/eip-20\\ninterface IERC20 {\\n /// @notice emitted when tokens are transfered from one address to another.\\n /// @param from address from which the token are transfered from (zero means tokens are minted).\\n /// @param to destination address which the token are transfered to (zero means tokens are burnt).\\n /// @param value amount of tokens transferred.\\n event Transfer(address indexed from, address indexed to, uint256 value);\\n\\n /// @notice emitted when owner grant transfer rights to another address\\n /// @param owner address allowing its token to be transferred.\\n /// @param spender address allowed to spend on behalf of `owner`\\n /// @param value amount of tokens allowed.\\n event Approval(address indexed owner, address indexed spender, uint256 value);\\n\\n /// @notice return the current total amount of tokens owned by all holders.\\n /// @return supply total number of tokens held.\\n function totalSupply() external view returns (uint256 supply);\\n\\n /// @notice return the number of tokens held by a particular address.\\n /// @param who address being queried.\\n /// @return balance number of token held by that address.\\n function balanceOf(address who) external view returns (uint256 balance);\\n\\n /// @notice transfer tokens to a specific address.\\n /// @param to destination address receiving the tokens.\\n /// @param value number of tokens to transfer.\\n /// @return success whether the transfer succeeded.\\n function transfer(address to, uint256 value) external returns (bool success);\\n\\n /// @notice transfer tokens from one address to another.\\n /// @param from address tokens will be sent from.\\n /// @param to destination address receiving the tokens.\\n /// @param value number of tokens to transfer.\\n /// @return success whether the transfer succeeded.\\n function transferFrom(\\n address from,\\n address to,\\n uint256 value\\n ) external returns (bool success);\\n\\n /// @notice approve an address to spend on your behalf.\\n /// @param spender address entitled to transfer on your behalf.\\n /// @param value amount allowed to be transfered.\\n /// @param success whether the approval succeeded.\\n function approve(address spender, uint256 value) external returns (bool success);\\n\\n /// @notice return the current allowance for a particular owner/spender pair.\\n /// @param owner address allowing spender.\\n /// @param spender address allowed to spend.\\n /// @return amount number of tokens `spender` can spend on behalf of `owner`.\\n function allowance(address owner, address spender) external view returns (uint256 amount);\\n}\\n\",\"keccak256\":\"0x9fe745d44fdcd7987682221d68b7a66d0784fbd81ae1d4e43a6c766347733a96\",\"license\":\"MIT\"},\"src/solc_0.8/common/interfaces/IERC20Extended.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity 0.8.2;\\n\\nimport \\\"./IERC20.sol\\\";\\n\\ninterface IERC20Extended is IERC20 {\\n function burnFor(address from, uint256 amount) external;\\n\\n function burn(uint256 amount) external;\\n\\n function approveFor(\\n address owner,\\n address spender,\\n uint256 amount\\n ) external returns (bool success);\\n}\\n\",\"keccak256\":\"0xf02074902aff81db019aac8808c524d2ab77e1cb216f5327992ed7db95fee919\",\"license\":\"MIT\"},\"src/solc_0.8/polygon/child/sand/PolygonSand.sol\":{\"content\":\"//SPDX-License-Identifier: MIT\\n// solhint-disable-next-line compiler-version\\npragma solidity 0.8.2;\\n\\nimport \\\"@openzeppelin/contracts-0.8/access/Ownable.sol\\\";\\nimport \\\"../../../common/BaseWithStorage/ERC2771Handler.sol\\\";\\nimport \\\"../../../Sand/SandBaseToken.sol\\\";\\n\\ncontract PolygonSand is SandBaseToken, Ownable, ERC2771Handler {\\n address public childChainManagerProxy;\\n\\n constructor(\\n address _childChainManagerProxy,\\n address trustedForwarder,\\n address sandAdmin,\\n address executionAdmin\\n ) SandBaseToken(sandAdmin, executionAdmin, address(0), 0) {\\n require(_childChainManagerProxy != address(0), \\\"Bad ChildChainManagerProxy address\\\");\\n childChainManagerProxy = _childChainManagerProxy;\\n __ERC2771Handler_initialize(trustedForwarder);\\n }\\n\\n /// @notice update the ChildChainManager Proxy address\\n /// @param newChildChainManagerProxy address of the new childChainManagerProxy\\n function updateChildChainManager(address newChildChainManagerProxy) external onlyOwner {\\n require(newChildChainManagerProxy != address(0), \\\"Bad ChildChainManagerProxy address\\\");\\n childChainManagerProxy = newChildChainManagerProxy;\\n }\\n\\n /// @notice called when tokens are deposited on root chain\\n /// @param user user address for whom deposit is being done\\n /// @param depositData abi encoded amount\\n function deposit(address user, bytes calldata depositData) external {\\n require(_msgSender() == childChainManagerProxy, \\\"You're not allowed to deposit\\\");\\n uint256 amount = abi.decode(depositData, (uint256));\\n _mint(user, amount);\\n }\\n\\n /// @notice called when user wants to withdraw tokens back to root chain\\n /// @dev Should burn user's tokens. This transaction will be verified when exiting on root chain\\n /// @param amount amount to withdraw\\n function withdraw(uint256 amount) external {\\n _burn(_msgSender(), amount);\\n }\\n\\n function setTrustedForwarder(address trustedForwarder) external onlyOwner {\\n _trustedForwarder = trustedForwarder;\\n }\\n\\n function _msgSender() internal view override(Context, ERC2771Handler) returns (address sender) {\\n return ERC2771Handler._msgSender();\\n }\\n\\n function _msgData() internal view override(Context, ERC2771Handler) returns (bytes calldata) {\\n return ERC2771Handler._msgData();\\n }\\n}\\n\",\"keccak256\":\"0x6628d9b21056558ce227fd612287f41579d8136a4420a389dcd6b16953e86009\",\"license\":\"MIT\"}},\"version\":1}", + "bytecode": "0x60a06040523480156200001157600080fd5b506040516200234b3803806200234b83398101604081905262000034916200049b565b81816000806040518060400160405280600481526020016314d0539160e21b8152506040518060400160405280600481526020016314d0539160e21b815250858583600290805190602001906200008d929190620003dd565b508251620000a3906003906020860190620003dd565b506000805460609290921b6001600160601b0319166080526001600160a01b03199182166001600160a01b039384161790911688831617905584161591506200010e9050576000620000fe82670de0b6b3a764000062000512565b90506200010c838262000225565b505b505050506000620001246200037e60201b60201c565b600780546001600160a01b0319166001600160a01b038316908117909155604051919250906000907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0908290a3506001600160a01b038416620001d95760405162461bcd60e51b815260206004820152602260248201527f426164204368696c64436861696e4d616e6167657250726f7879206164647265604482015261737360f01b60648201526084015b60405180910390fd5b600980546001600160a01b0319166001600160a01b0386161790556200021b83600880546001600160a01b0319166001600160a01b0392909216919091179055565b5050505062000587565b6001600160a01b038216620002725760405162461bcd60e51b81526020600482015260126024820152714e4f545f544f5f5a45524f4144445245535360701b6044820152606401620001d0565b60008111620002b45760405162461bcd60e51b815260206004820152600d60248201526c4d494e545f4f5f544f4b454e5360981b6044820152606401620001d0565b6004546000620002c58383620004f7565b9050818111620003035760405162461bcd60e51b81526020600482015260086024820152674f564552464c4f5760c01b6044820152606401620001d0565b60048190556001600160a01b0384166000908152600560205260408120805485929062000332908490620004f7565b90915550506040518381526001600160a01b038516906000907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef9060200160405180910390a350505050565b6000620003956200039b60201b6200123c1760201c565b90505b90565b6000620003a833620003c6565b15620003be575060131936013560601c62000398565b503362000398565b6008546001600160a01b038281169116145b919050565b828054620003eb9062000534565b90600052602060002090601f0160209004810192826200040f57600085556200045a565b82601f106200042a57805160ff19168380011785556200045a565b828001600101855582156200045a579182015b828111156200045a5782518255916020019190600101906200043d565b50620004689291506200046c565b5090565b5b808211156200046857600081556001016200046d565b80516001600160a01b0381168114620003d857600080fd5b60008060008060808587031215620004b1578384fd5b620004bc8562000483565b9350620004cc6020860162000483565b9250620004dc6040860162000483565b9150620004ec6060860162000483565b905092959194509250565b600082198211156200050d576200050d62000571565b500190565b60008160001904831182151516156200052f576200052f62000571565b500290565b6002810460018216806200054957607f821691505b602082108114156200056b57634e487b7160e01b600052602260045260246000fd5b50919050565b634e487b7160e01b600052601160045260246000fd5b60805160601c611d89620005c2600039600081816106af0152818161083e0152818161093a0152818161140501526117ec0152611d896000f3fe6080604052600436106101c25760003560e01c80636e9960c3116100f7578063ac9fe42111610095578063cf2c52cb11610064578063cf2c52cb146104f0578063da74222814610510578063dd62ed3e14610530578063f2fde38b14610576576101c2565b8063ac9fe4211461048c578063bb1e23cb146104ac578063cae9ca51146104bf578063ce1b815f146104d2576101c2565b80638da5cb5b116100d15780638da5cb5b146104195780638f2839701461043757806395d89b4114610457578063a9059cbb1461046c576101c2565b80636e9960c3146103b057806370a08231146103ce578063715018a614610404576101c2565b8063313ce56711610164578063445a67971161013e578063445a6797146102ff578063572b6c051461031f57806362f629e71461033f578063654b748a14610377576101c2565b8063313ce567146102c35780633b7b5a16146102df57806342966c68146102a3576101c2565b80631dd319cb116101a05780631dd319cb1461024157806323b872dd146102635780632b991746146102835780632e1a7d4d146102a3576101c2565b806306fdde03146101c7578063095ea7b3146101f257806318160ddd14610222575b600080fd5b3480156101d357600080fd5b506101dc610596565b6040516101e99190611c8e565b60405180910390f35b3480156101fe57600080fd5b5061021261020d366004611b7c565b610629565b60405190151581526020016101e9565b34801561022e57600080fd5b506004545b6040519081526020016101e9565b34801561024d57600080fd5b5061026161025c366004611b7c565b610647565b005b34801561026f57600080fd5b5061021261027e366004611ab6565b610655565b34801561028f57600080fd5b5061021261029e366004611ab6565b6107e8565b3480156102af57600080fd5b506102616102be366004611bfd565b6108d0565b3480156102cf57600080fd5b50604051601281526020016101e9565b3480156102eb57600080fd5b506102126102fa366004611ab6565b6108e4565b34801561030b57600080fd5b5061026161031a366004611a63565b6109cc565b34801561032b57600080fd5b5061021261033a366004611a63565b610af0565b34801561034b57600080fd5b5060095461035f906001600160a01b031681565b6040516001600160a01b0390911681526020016101e9565b34801561038357600080fd5b50610212610392366004611a63565b6001600160a01b031660009081526001602052604090205460ff1690565b3480156103bc57600080fd5b506000546001600160a01b031661035f565b3480156103da57600080fd5b506102336103e9366004611a63565b6001600160a01b031660009081526005602052604090205490565b34801561041057600080fd5b50610261610b07565b34801561042557600080fd5b506007546001600160a01b031661035f565b34801561044357600080fd5b50610261610452366004611a63565b610bd7565b34801561046357600080fd5b506101dc610ca7565b34801561047857600080fd5b50610212610487366004611b7c565b610cb6565b34801561049857600080fd5b506102616104a7366004611af1565b610cca565b6101dc6104ba366004611ba5565b610dcb565b6101dc6104cd366004611ba5565b610f09565b3480156104de57600080fd5b506008546001600160a01b031661035f565b3480156104fc57600080fd5b5061026161050b366004611b2b565b610fac565b34801561051c57600080fd5b5061026161052b366004611a63565b611036565b34801561053c57600080fd5b5061023361054b366004611a84565b6001600160a01b03918216600090815260066020908152604080832093909416825291909152205490565b34801561058257600080fd5b50610261610591366004611a63565b6110de565b6060600280546105a590611cd0565b80601f01602080910402602001604051908101604052809291908181526020018280546105d190611cd0565b801561061e5780601f106105f35761010080835404028352916020019161061e565b820191906000526020600020905b81548152906001019060200180831161060157829003601f168201915b505050505090505b90565b600061063d610636611280565b848461128f565b5060015b92915050565b610651828261135d565b5050565b6000836001600160a01b0316610669611280565b6001600160a01b0316141580156106a6575060016000610687611280565b6001600160a01b0316815260208101919091526040016000205460ff16155b80156106eb57507f00000000000000000000000000000000000000000000000000000000000000006001600160a01b03166106df611280565b6001600160a01b031614155b156107d3576001600160a01b038416600090815260066020526040812081610711611280565b6001600160a01b03168152602081019190915260400160002054905060001981146107d1578281101561078b5760405162461bcd60e51b815260206004820152601860248201527f4e4f545f415554484f52495a45445f414c4c4f57414e4345000000000000000060448201526064015b60405180910390fd5b6107958382611cb9565b6001600160a01b0386166000908152600660205260408120906107b6611280565b6001600160a01b031681526020810191909152604001600020555b505b6107de848484611608565b5060019392505050565b6000836001600160a01b03166107fc611280565b6001600160a01b03161480610836575060016000610818611280565b6001600160a01b0316815260208101919091526040016000205460ff165b8061087957507f00000000000000000000000000000000000000000000000000000000000000006001600160a01b031661086e611280565b6001600160a01b0316145b6108c55760405162461bcd60e51b815260206004820152600e60248201527f4e4f545f415554484f52495a45440000000000000000000000000000000000006044820152606401610782565b6107de84848461128f565b6108e16108db611280565b8261135d565b50565b6000836001600160a01b03166108f8611280565b6001600160a01b03161480610932575060016000610914611280565b6001600160a01b0316815260208101919091526040016000205460ff165b8061097557507f00000000000000000000000000000000000000000000000000000000000000006001600160a01b031661096a611280565b6001600160a01b0316145b6109c15760405162461bcd60e51b815260206004820152600e60248201527f494e56414c49445f53454e4445520000000000000000000000000000000000006044820152606401610782565b6107de8484846117ba565b6109d4611280565b6001600160a01b03166109ef6007546001600160a01b031690565b6001600160a01b031614610a455760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e65726044820152606401610782565b6001600160a01b038116610ac15760405162461bcd60e51b815260206004820152602260248201527f426164204368696c64436861696e4d616e6167657250726f787920616464726560448201527f73730000000000000000000000000000000000000000000000000000000000006064820152608401610782565b6009805473ffffffffffffffffffffffffffffffffffffffff19166001600160a01b0392909216919091179055565b6008546001600160a01b038281169116145b919050565b610b0f611280565b6001600160a01b0316610b2a6007546001600160a01b031690565b6001600160a01b031614610b805760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e65726044820152606401610782565b6007546040516000916001600160a01b0316907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0908390a36007805473ffffffffffffffffffffffffffffffffffffffff19169055565b6000546001600160a01b03163314610c315760405162461bcd60e51b815260206004820152601360248201527f41444d494e5f4143434553535f44454e494544000000000000000000000000006044820152606401610782565b600054604080516001600160a01b03928316815291831660208301527f7e644d79422f17c01e4894b5f4f588d331ebfa28653d42ae832dc59e38c9798f910160405180910390a16000805473ffffffffffffffffffffffffffffffffffffffff19166001600160a01b0392909216919091179055565b6060600380546105a590611cd0565b600061063d610cc3611280565b8484611608565b6000546001600160a01b03163314610d4a5760405162461bcd60e51b815260206004820152602c60248201527f6f6e6c792061646d696e20697320616c6c6f77656420746f206164642073757060448201527f6572206f70657261746f727300000000000000000000000000000000000000006064820152608401610782565b6001600160a01b03821660008181526001602090815260409182902080547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff00168515159081179091558251938452908301527f44f92d27abdf4cfb6a7d712c3af68f3be086d4ca747ab802c36f67d6790060d8910160405180910390a15050565b6060610e1583838080601f016020809104026020016040519081016040528093929190818152602001838380828437600092019190915250610e109250611280915050565b611864565b610e615760405162461bcd60e51b815260206004820152601660248201527f46495253545f504152414d5f4e4f545f53454e444552000000000000000000006044820152606401610782565b8315610e7957610e79610e72611280565b86866117ba565b600080866001600160a01b0316348686604051610e97929190611c7e565b60006040518083038185875af1925050503d8060008114610ed4576040519150601f19603f3d011682016040523d82523d6000602084013e610ed9565b606091505b5091509150818190610efe5760405162461bcd60e51b81526004016107829190611c8e565b509695505050505050565b6060610f4e83838080601f016020809104026020016040519081016040528093929190818152602001838380828437600092019190915250610e109250611280915050565b610f9a5760405162461bcd60e51b815260206004820152601660248201527f46495253545f504152414d5f4e4f545f53454e444552000000000000000000006044820152606401610782565b610e79610fa5611280565b868661128f565b6009546001600160a01b0316610fc0611280565b6001600160a01b0316146110165760405162461bcd60e51b815260206004820152601d60248201527f596f75277265206e6f7420616c6c6f77656420746f206465706f7369740000006044820152606401610782565b600061102482840184611bfd565b9050611030848261188f565b50505050565b61103e611280565b6001600160a01b03166110596007546001600160a01b031690565b6001600160a01b0316146110af5760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e65726044820152606401610782565b6008805473ffffffffffffffffffffffffffffffffffffffff19166001600160a01b0392909216919091179055565b6110e6611280565b6001600160a01b03166111016007546001600160a01b031690565b6001600160a01b0316146111575760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e65726044820152606401610782565b6001600160a01b0381166111d35760405162461bcd60e51b815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201527f64647265737300000000000000000000000000000000000000000000000000006064820152608401610782565b6007546040516001600160a01b038084169216907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e090600090a36007805473ffffffffffffffffffffffffffffffffffffffff19166001600160a01b0392909216919091179055565b600061124733610af0565b1561127957507fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffec36013560601c610626565b5033610626565b600061128a61123c565b905090565b6001600160a01b038316158015906112af57506001600160a01b03821615155b6112fb5760405162461bcd60e51b815260206004820152601860248201527f494e56414c49445f4f574e45525f7c7c5f5350454e44455200000000000000006044820152606401610782565b6001600160a01b0383811660008181526006602090815260408083209487168084529482529182902085905590518481527f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b92591015b60405180910390a3505050565b600081116113ad5760405162461bcd60e51b815260206004820152600d60248201527f4255524e5f4f5f544f4b454e53000000000000000000000000000000000000006044820152606401610782565b816001600160a01b03166113bf611280565b6001600160a01b0316141580156113fc5750600160006113dd611280565b6001600160a01b0316815260208101919091526040016000205460ff16155b801561144157507f00000000000000000000000000000000000000000000000000000000000000006001600160a01b0316611435611280565b6001600160a01b031614155b15611524576001600160a01b038216600090815260066020526040812081611467611280565b6001600160a01b031681526020810191909152604001600020549050600019811461152257818110156114dc5760405162461bcd60e51b815260206004820152601660248201527f494e53554646494349454e545f414c4c4f57414e4345000000000000000000006044820152606401610782565b6114e68282611cb9565b6001600160a01b038416600090815260066020526040812090611507611280565b6001600160a01b031681526020810191909152604001600020555b505b6001600160a01b0382166000908152600560205260409020548181101561158d5760405162461bcd60e51b815260206004820152601260248201527f494e53554646494349454e545f46554e445300000000000000000000000000006044820152606401610782565b6115978282611cb9565b6001600160a01b038416600090815260056020526040812091909155600480548492906115c5908490611cb9565b90915550506040518281526000906001600160a01b038516907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef90602001611350565b6001600160a01b03821661165e5760405162461bcd60e51b815260206004820152601260248201527f4e4f545f544f5f5a45524f4144445245535300000000000000000000000000006044820152606401610782565b6001600160a01b0382163014156116b75760405162461bcd60e51b815260206004820152600b60248201527f4e4f545f544f5f544849530000000000000000000000000000000000000000006044820152606401610782565b6001600160a01b038316600090815260056020526040902054818110156117205760405162461bcd60e51b815260206004820152601260248201527f494e53554646494349454e545f46554e445300000000000000000000000000006044820152606401610782565b61172a8282611cb9565b6001600160a01b038086166000908152600560205260408082209390935590851681529081208054849290611760908490611ca1565b92505081905550826001600160a01b0316846001600160a01b03167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef846040516117ac91815260200190565b60405180910390a350505050565b6000811180156117e357506001600160a01b03821660009081526001602052604090205460ff16155b801561182157507f00000000000000000000000000000000000000000000000000000000000000006001600160a01b0316826001600160a01b031614155b1561185f576001600160a01b03808416600090815260066020908152604080832093861683529290522054818110156110305761103084848461128f565b505050565b600060448351101561187857506000610641565b5060248201516001600160a01b0382161492915050565b6001600160a01b0382166118e55760405162461bcd60e51b815260206004820152601260248201527f4e4f545f544f5f5a45524f4144445245535300000000000000000000000000006044820152606401610782565b600081116119355760405162461bcd60e51b815260206004820152600d60248201527f4d494e545f4f5f544f4b454e53000000000000000000000000000000000000006044820152606401610782565b60045460006119448383611ca1565b90508181116119955760405162461bcd60e51b815260206004820152600860248201527f4f564552464c4f570000000000000000000000000000000000000000000000006044820152606401610782565b60048190556001600160a01b038416600090815260056020526040812080548592906119c2908490611ca1565b90915550506040518381526001600160a01b038516906000907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef906020016117ac565b80356001600160a01b0381168114610b0257600080fd5b60008083601f840112611a2d578182fd5b50813567ffffffffffffffff811115611a44578182fd5b602083019150836020828501011115611a5c57600080fd5b9250929050565b600060208284031215611a74578081fd5b611a7d82611a05565b9392505050565b60008060408385031215611a96578081fd5b611a9f83611a05565b9150611aad60208401611a05565b90509250929050565b600080600060608486031215611aca578081fd5b611ad384611a05565b9250611ae160208501611a05565b9150604084013590509250925092565b60008060408385031215611b03578182fd5b611b0c83611a05565b915060208301358015158114611b20578182fd5b809150509250929050565b600080600060408486031215611b3f578283fd5b611b4884611a05565b9250602084013567ffffffffffffffff811115611b63578283fd5b611b6f86828701611a1c565b9497909650939450505050565b60008060408385031215611b8e578182fd5b611b9783611a05565b946020939093013593505050565b60008060008060608587031215611bba578081fd5b611bc385611a05565b935060208501359250604085013567ffffffffffffffff811115611be5578182fd5b611bf187828801611a1c565b95989497509550505050565b600060208284031215611c0e578081fd5b5035919050565b60008151808452815b81811015611c3a57602081850181015186830182015201611c1e565b81811115611c4b5782602083870101525b50601f017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0169290920160200192915050565b6000828483379101908152919050565b600060208252611a7d6020830184611c15565b60008219821115611cb457611cb4611d24565b500190565b600082821015611ccb57611ccb611d24565b500390565b600281046001821680611ce457607f821691505b60208210811415611d1e577f4e487b7100000000000000000000000000000000000000000000000000000000600052602260045260246000fd5b50919050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fdfea264697066735822122062a887365b69f1c5fb4fb5b0be071e4c0dc583555fa546d72053d18702a5dfe064736f6c63430008020033", + "deployedBytecode": "0x6080604052600436106101c25760003560e01c80636e9960c3116100f7578063ac9fe42111610095578063cf2c52cb11610064578063cf2c52cb146104f0578063da74222814610510578063dd62ed3e14610530578063f2fde38b14610576576101c2565b8063ac9fe4211461048c578063bb1e23cb146104ac578063cae9ca51146104bf578063ce1b815f146104d2576101c2565b80638da5cb5b116100d15780638da5cb5b146104195780638f2839701461043757806395d89b4114610457578063a9059cbb1461046c576101c2565b80636e9960c3146103b057806370a08231146103ce578063715018a614610404576101c2565b8063313ce56711610164578063445a67971161013e578063445a6797146102ff578063572b6c051461031f57806362f629e71461033f578063654b748a14610377576101c2565b8063313ce567146102c35780633b7b5a16146102df57806342966c68146102a3576101c2565b80631dd319cb116101a05780631dd319cb1461024157806323b872dd146102635780632b991746146102835780632e1a7d4d146102a3576101c2565b806306fdde03146101c7578063095ea7b3146101f257806318160ddd14610222575b600080fd5b3480156101d357600080fd5b506101dc610596565b6040516101e99190611c8e565b60405180910390f35b3480156101fe57600080fd5b5061021261020d366004611b7c565b610629565b60405190151581526020016101e9565b34801561022e57600080fd5b506004545b6040519081526020016101e9565b34801561024d57600080fd5b5061026161025c366004611b7c565b610647565b005b34801561026f57600080fd5b5061021261027e366004611ab6565b610655565b34801561028f57600080fd5b5061021261029e366004611ab6565b6107e8565b3480156102af57600080fd5b506102616102be366004611bfd565b6108d0565b3480156102cf57600080fd5b50604051601281526020016101e9565b3480156102eb57600080fd5b506102126102fa366004611ab6565b6108e4565b34801561030b57600080fd5b5061026161031a366004611a63565b6109cc565b34801561032b57600080fd5b5061021261033a366004611a63565b610af0565b34801561034b57600080fd5b5060095461035f906001600160a01b031681565b6040516001600160a01b0390911681526020016101e9565b34801561038357600080fd5b50610212610392366004611a63565b6001600160a01b031660009081526001602052604090205460ff1690565b3480156103bc57600080fd5b506000546001600160a01b031661035f565b3480156103da57600080fd5b506102336103e9366004611a63565b6001600160a01b031660009081526005602052604090205490565b34801561041057600080fd5b50610261610b07565b34801561042557600080fd5b506007546001600160a01b031661035f565b34801561044357600080fd5b50610261610452366004611a63565b610bd7565b34801561046357600080fd5b506101dc610ca7565b34801561047857600080fd5b50610212610487366004611b7c565b610cb6565b34801561049857600080fd5b506102616104a7366004611af1565b610cca565b6101dc6104ba366004611ba5565b610dcb565b6101dc6104cd366004611ba5565b610f09565b3480156104de57600080fd5b506008546001600160a01b031661035f565b3480156104fc57600080fd5b5061026161050b366004611b2b565b610fac565b34801561051c57600080fd5b5061026161052b366004611a63565b611036565b34801561053c57600080fd5b5061023361054b366004611a84565b6001600160a01b03918216600090815260066020908152604080832093909416825291909152205490565b34801561058257600080fd5b50610261610591366004611a63565b6110de565b6060600280546105a590611cd0565b80601f01602080910402602001604051908101604052809291908181526020018280546105d190611cd0565b801561061e5780601f106105f35761010080835404028352916020019161061e565b820191906000526020600020905b81548152906001019060200180831161060157829003601f168201915b505050505090505b90565b600061063d610636611280565b848461128f565b5060015b92915050565b610651828261135d565b5050565b6000836001600160a01b0316610669611280565b6001600160a01b0316141580156106a6575060016000610687611280565b6001600160a01b0316815260208101919091526040016000205460ff16155b80156106eb57507f00000000000000000000000000000000000000000000000000000000000000006001600160a01b03166106df611280565b6001600160a01b031614155b156107d3576001600160a01b038416600090815260066020526040812081610711611280565b6001600160a01b03168152602081019190915260400160002054905060001981146107d1578281101561078b5760405162461bcd60e51b815260206004820152601860248201527f4e4f545f415554484f52495a45445f414c4c4f57414e4345000000000000000060448201526064015b60405180910390fd5b6107958382611cb9565b6001600160a01b0386166000908152600660205260408120906107b6611280565b6001600160a01b031681526020810191909152604001600020555b505b6107de848484611608565b5060019392505050565b6000836001600160a01b03166107fc611280565b6001600160a01b03161480610836575060016000610818611280565b6001600160a01b0316815260208101919091526040016000205460ff165b8061087957507f00000000000000000000000000000000000000000000000000000000000000006001600160a01b031661086e611280565b6001600160a01b0316145b6108c55760405162461bcd60e51b815260206004820152600e60248201527f4e4f545f415554484f52495a45440000000000000000000000000000000000006044820152606401610782565b6107de84848461128f565b6108e16108db611280565b8261135d565b50565b6000836001600160a01b03166108f8611280565b6001600160a01b03161480610932575060016000610914611280565b6001600160a01b0316815260208101919091526040016000205460ff165b8061097557507f00000000000000000000000000000000000000000000000000000000000000006001600160a01b031661096a611280565b6001600160a01b0316145b6109c15760405162461bcd60e51b815260206004820152600e60248201527f494e56414c49445f53454e4445520000000000000000000000000000000000006044820152606401610782565b6107de8484846117ba565b6109d4611280565b6001600160a01b03166109ef6007546001600160a01b031690565b6001600160a01b031614610a455760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e65726044820152606401610782565b6001600160a01b038116610ac15760405162461bcd60e51b815260206004820152602260248201527f426164204368696c64436861696e4d616e6167657250726f787920616464726560448201527f73730000000000000000000000000000000000000000000000000000000000006064820152608401610782565b6009805473ffffffffffffffffffffffffffffffffffffffff19166001600160a01b0392909216919091179055565b6008546001600160a01b038281169116145b919050565b610b0f611280565b6001600160a01b0316610b2a6007546001600160a01b031690565b6001600160a01b031614610b805760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e65726044820152606401610782565b6007546040516000916001600160a01b0316907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0908390a36007805473ffffffffffffffffffffffffffffffffffffffff19169055565b6000546001600160a01b03163314610c315760405162461bcd60e51b815260206004820152601360248201527f41444d494e5f4143434553535f44454e494544000000000000000000000000006044820152606401610782565b600054604080516001600160a01b03928316815291831660208301527f7e644d79422f17c01e4894b5f4f588d331ebfa28653d42ae832dc59e38c9798f910160405180910390a16000805473ffffffffffffffffffffffffffffffffffffffff19166001600160a01b0392909216919091179055565b6060600380546105a590611cd0565b600061063d610cc3611280565b8484611608565b6000546001600160a01b03163314610d4a5760405162461bcd60e51b815260206004820152602c60248201527f6f6e6c792061646d696e20697320616c6c6f77656420746f206164642073757060448201527f6572206f70657261746f727300000000000000000000000000000000000000006064820152608401610782565b6001600160a01b03821660008181526001602090815260409182902080547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff00168515159081179091558251938452908301527f44f92d27abdf4cfb6a7d712c3af68f3be086d4ca747ab802c36f67d6790060d8910160405180910390a15050565b6060610e1583838080601f016020809104026020016040519081016040528093929190818152602001838380828437600092019190915250610e109250611280915050565b611864565b610e615760405162461bcd60e51b815260206004820152601660248201527f46495253545f504152414d5f4e4f545f53454e444552000000000000000000006044820152606401610782565b8315610e7957610e79610e72611280565b86866117ba565b600080866001600160a01b0316348686604051610e97929190611c7e565b60006040518083038185875af1925050503d8060008114610ed4576040519150601f19603f3d011682016040523d82523d6000602084013e610ed9565b606091505b5091509150818190610efe5760405162461bcd60e51b81526004016107829190611c8e565b509695505050505050565b6060610f4e83838080601f016020809104026020016040519081016040528093929190818152602001838380828437600092019190915250610e109250611280915050565b610f9a5760405162461bcd60e51b815260206004820152601660248201527f46495253545f504152414d5f4e4f545f53454e444552000000000000000000006044820152606401610782565b610e79610fa5611280565b868661128f565b6009546001600160a01b0316610fc0611280565b6001600160a01b0316146110165760405162461bcd60e51b815260206004820152601d60248201527f596f75277265206e6f7420616c6c6f77656420746f206465706f7369740000006044820152606401610782565b600061102482840184611bfd565b9050611030848261188f565b50505050565b61103e611280565b6001600160a01b03166110596007546001600160a01b031690565b6001600160a01b0316146110af5760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e65726044820152606401610782565b6008805473ffffffffffffffffffffffffffffffffffffffff19166001600160a01b0392909216919091179055565b6110e6611280565b6001600160a01b03166111016007546001600160a01b031690565b6001600160a01b0316146111575760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e65726044820152606401610782565b6001600160a01b0381166111d35760405162461bcd60e51b815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201527f64647265737300000000000000000000000000000000000000000000000000006064820152608401610782565b6007546040516001600160a01b038084169216907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e090600090a36007805473ffffffffffffffffffffffffffffffffffffffff19166001600160a01b0392909216919091179055565b600061124733610af0565b1561127957507fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffec36013560601c610626565b5033610626565b600061128a61123c565b905090565b6001600160a01b038316158015906112af57506001600160a01b03821615155b6112fb5760405162461bcd60e51b815260206004820152601860248201527f494e56414c49445f4f574e45525f7c7c5f5350454e44455200000000000000006044820152606401610782565b6001600160a01b0383811660008181526006602090815260408083209487168084529482529182902085905590518481527f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b92591015b60405180910390a3505050565b600081116113ad5760405162461bcd60e51b815260206004820152600d60248201527f4255524e5f4f5f544f4b454e53000000000000000000000000000000000000006044820152606401610782565b816001600160a01b03166113bf611280565b6001600160a01b0316141580156113fc5750600160006113dd611280565b6001600160a01b0316815260208101919091526040016000205460ff16155b801561144157507f00000000000000000000000000000000000000000000000000000000000000006001600160a01b0316611435611280565b6001600160a01b031614155b15611524576001600160a01b038216600090815260066020526040812081611467611280565b6001600160a01b031681526020810191909152604001600020549050600019811461152257818110156114dc5760405162461bcd60e51b815260206004820152601660248201527f494e53554646494349454e545f414c4c4f57414e4345000000000000000000006044820152606401610782565b6114e68282611cb9565b6001600160a01b038416600090815260066020526040812090611507611280565b6001600160a01b031681526020810191909152604001600020555b505b6001600160a01b0382166000908152600560205260409020548181101561158d5760405162461bcd60e51b815260206004820152601260248201527f494e53554646494349454e545f46554e445300000000000000000000000000006044820152606401610782565b6115978282611cb9565b6001600160a01b038416600090815260056020526040812091909155600480548492906115c5908490611cb9565b90915550506040518281526000906001600160a01b038516907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef90602001611350565b6001600160a01b03821661165e5760405162461bcd60e51b815260206004820152601260248201527f4e4f545f544f5f5a45524f4144445245535300000000000000000000000000006044820152606401610782565b6001600160a01b0382163014156116b75760405162461bcd60e51b815260206004820152600b60248201527f4e4f545f544f5f544849530000000000000000000000000000000000000000006044820152606401610782565b6001600160a01b038316600090815260056020526040902054818110156117205760405162461bcd60e51b815260206004820152601260248201527f494e53554646494349454e545f46554e445300000000000000000000000000006044820152606401610782565b61172a8282611cb9565b6001600160a01b038086166000908152600560205260408082209390935590851681529081208054849290611760908490611ca1565b92505081905550826001600160a01b0316846001600160a01b03167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef846040516117ac91815260200190565b60405180910390a350505050565b6000811180156117e357506001600160a01b03821660009081526001602052604090205460ff16155b801561182157507f00000000000000000000000000000000000000000000000000000000000000006001600160a01b0316826001600160a01b031614155b1561185f576001600160a01b03808416600090815260066020908152604080832093861683529290522054818110156110305761103084848461128f565b505050565b600060448351101561187857506000610641565b5060248201516001600160a01b0382161492915050565b6001600160a01b0382166118e55760405162461bcd60e51b815260206004820152601260248201527f4e4f545f544f5f5a45524f4144445245535300000000000000000000000000006044820152606401610782565b600081116119355760405162461bcd60e51b815260206004820152600d60248201527f4d494e545f4f5f544f4b454e53000000000000000000000000000000000000006044820152606401610782565b60045460006119448383611ca1565b90508181116119955760405162461bcd60e51b815260206004820152600860248201527f4f564552464c4f570000000000000000000000000000000000000000000000006044820152606401610782565b60048190556001600160a01b038416600090815260056020526040812080548592906119c2908490611ca1565b90915550506040518381526001600160a01b038516906000907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef906020016117ac565b80356001600160a01b0381168114610b0257600080fd5b60008083601f840112611a2d578182fd5b50813567ffffffffffffffff811115611a44578182fd5b602083019150836020828501011115611a5c57600080fd5b9250929050565b600060208284031215611a74578081fd5b611a7d82611a05565b9392505050565b60008060408385031215611a96578081fd5b611a9f83611a05565b9150611aad60208401611a05565b90509250929050565b600080600060608486031215611aca578081fd5b611ad384611a05565b9250611ae160208501611a05565b9150604084013590509250925092565b60008060408385031215611b03578182fd5b611b0c83611a05565b915060208301358015158114611b20578182fd5b809150509250929050565b600080600060408486031215611b3f578283fd5b611b4884611a05565b9250602084013567ffffffffffffffff811115611b63578283fd5b611b6f86828701611a1c565b9497909650939450505050565b60008060408385031215611b8e578182fd5b611b9783611a05565b946020939093013593505050565b60008060008060608587031215611bba578081fd5b611bc385611a05565b935060208501359250604085013567ffffffffffffffff811115611be5578182fd5b611bf187828801611a1c565b95989497509550505050565b600060208284031215611c0e578081fd5b5035919050565b60008151808452815b81811015611c3a57602081850181015186830182015201611c1e565b81811115611c4b5782602083870101525b50601f017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0169290920160200192915050565b6000828483379101908152919050565b600060208252611a7d6020830184611c15565b60008219821115611cb457611cb4611d24565b500190565b600082821015611ccb57611ccb611d24565b500390565b600281046001821680611ce457607f821691505b60208210811415611d1e577f4e487b7100000000000000000000000000000000000000000000000000000000600052602260045260246000fd5b50919050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fdfea264697066735822122062a887365b69f1c5fb4fb5b0be071e4c0dc583555fa546d72053d18702a5dfe064736f6c63430008020033", + "devdoc": { + "kind": "dev", + "methods": { + "addAllowanceIfNeeded(address,address,uint256)": { + "params": { + "amountNeeded": "The amount requested to spend", + "owner": "The address of the owner of the tokens", + "spender": "The address wanting to spend tokens" + }, + "returns": { + "success": "Whether or not the call succeeded." + } + }, + "allowance(address,address)": { + "params": { + "owner": "The address whose token is allowed.", + "spender": "The address allowed to transfer." + }, + "returns": { + "remaining": "The amount of token `spender` is allowed to transfer on behalf of `owner`." + } + }, + "approve(address,uint256)": { + "params": { + "amount": "The number of tokens allowed.", + "spender": "The address to be given rights to transfer." + }, + "returns": { + "success": "Whether or not the call succeeded." + } + }, + "approveAndCall(address,uint256,bytes)": { + "params": { + "amount": "The number of tokens allowed.", + "data": "The bytes for the call.", + "target": "The address to be given rights to transfer and destination of the call." + }, + "returns": { + "_0": "The data of the call." + } + }, + "approveFor(address,address,uint256)": { + "params": { + "amount": "The number of tokens allowed.", + "owner": "The address whose token is allowed.", + "spender": "The address to be given rights to transfer." + }, + "returns": { + "success": "Whether or not the call succeeded." + } + }, + "balanceOf(address)": { + "params": { + "owner": "The address to query the balance of." + }, + "returns": { + "_0": "The amount owned by `owner`." + } + }, + "burn(uint256)": { + "params": { + "amount": "The number of tokens to burn." + } + }, + "burnFor(address,uint256)": { + "params": { + "amount": "The number of tokens to burn.", + "from": "The address whose token to burn." + } + }, + "changeAdmin(address)": { + "details": "Change the administrator to be `newAdmin`.", + "params": { + "newAdmin": "The address of the new administrator." + } + }, + "decimals()": { + "returns": { + "_0": "The number of decimals." + } + }, + "deposit(address,bytes)": { + "params": { + "depositData": "abi encoded amount", + "user": "user address for whom deposit is being done" + } + }, + "getAdmin()": { + "details": "Get the current administrator of this contract.", + "returns": { + "_0": "The current administrator of this contract." + } + }, + "isSuperOperator(address)": { + "params": { + "who": "The address to query." + }, + "returns": { + "_0": "whether the address has superOperator rights." + } + }, + "name()": { + "returns": { + "_0": "The name of the token collection." + } + }, + "owner()": { + "details": "Returns the address of the current owner." + }, + "paidCall(address,uint256,bytes)": { + "params": { + "amount": "The number of tokens allowed to spend.", + "data": "The bytes for the call.", + "target": "The destination of the call, allowed to spend the amount specified" + }, + "returns": { + "_0": "The data of the call." + } + }, + "renounceOwnership()": { + "details": "Leaves the contract without owner. It will not be possible to call `onlyOwner` functions anymore. Can only be called by the current owner. NOTE: Renouncing ownership will leave the contract without an owner, thereby removing any functionality that is only available to the owner." + }, + "setSuperOperator(address,bool)": { + "params": { + "enabled": "set whether the superOperator is enabled or disabled.", + "superOperator": "address that will be given/removed superOperator right." + } + }, + "symbol()": { + "returns": { + "_0": "The symbol of the token collection." + } + }, + "totalSupply()": { + "returns": { + "_0": "The total number of tokens in existence." + } + }, + "transfer(address,uint256)": { + "params": { + "amount": "The number of tokens being transfered.", + "to": "The recipient address of the tokens being transfered." + }, + "returns": { + "success": "Whether or not the transfer succeeded." + } + }, + "transferFrom(address,address,uint256)": { + "params": { + "amount": "The number of tokens transfered.", + "from": "The origin address of the tokens being transferred.", + "to": "The recipient address of the tokensbeing transfered." + }, + "returns": { + "success": "Whether or not the transfer succeeded." + } + }, + "transferOwnership(address)": { + "details": "Transfers ownership of the contract to a new account (`newOwner`). Can only be called by the current owner." + }, + "updateChildChainManager(address)": { + "params": { + "newChildChainManagerProxy": "address of the new childChainManagerProxy" + } + }, + "withdraw(uint256)": { + "details": "Should burn user's tokens. This transaction will be verified when exiting on root chain", + "params": { + "amount": "amount to withdraw" + } + } + }, + "version": 1 + }, + "userdoc": { + "events": { + "Approval(address,address,uint256)": { + "notice": "emitted when owner grant transfer rights to another address" + }, + "Transfer(address,address,uint256)": { + "notice": "emitted when tokens are transfered from one address to another." + } + }, + "kind": "user", + "methods": { + "addAllowanceIfNeeded(address,address,uint256)": { + "notice": "Increase the allowance for the spender if needed" + }, + "allowance(address,address)": { + "notice": "Get the allowance of `spender` for `owner`'s tokens." + }, + "approve(address,uint256)": { + "notice": "Approve `spender` to transfer `amount` tokens." + }, + "approveAndCall(address,uint256,bytes)": { + "notice": "Approve `target` to spend `amount` and call it with data." + }, + "approveFor(address,address,uint256)": { + "notice": "Approve `spender` to transfer `amount` tokens from `owner`." + }, + "balanceOf(address)": { + "notice": "Get the balance of `owner`." + }, + "burn(uint256)": { + "notice": "Burn `amount` tokens." + }, + "burnFor(address,uint256)": { + "notice": "Burn `amount` tokens from `owner`." + }, + "decimals()": { + "notice": "Get the number of decimals for the token collection." + }, + "deposit(address,bytes)": { + "notice": "called when tokens are deposited on root chain" + }, + "isSuperOperator(address)": { + "notice": "check whether address `who` is given superOperator rights." + }, + "name()": { + "notice": "Get the name of the token collection." + }, + "paidCall(address,uint256,bytes)": { + "notice": "Temporarily approve `target` to spend `amount` and call it with data. Previous approvals remains unchanged." + }, + "setSuperOperator(address,bool)": { + "notice": "Enable or disable the ability of `superOperator` to transfer tokens of all (superOperator rights)." + }, + "symbol()": { + "notice": "Get the symbol for the token collection." + }, + "totalSupply()": { + "notice": "Get the total number of tokens in existence." + }, + "transfer(address,uint256)": { + "notice": "Transfer `amount` tokens to `to`." + }, + "transferFrom(address,address,uint256)": { + "notice": "Transfer `amount` tokens from `from` to `to`." + }, + "updateChildChainManager(address)": { + "notice": "update the ChildChainManager Proxy address" + }, + "withdraw(uint256)": { + "notice": "called when user wants to withdraw tokens back to root chain" + } + }, + "version": 1 + }, + "storageLayout": { + "storage": [ + { + "astId": 16882, + "contract": "src/solc_0.8/polygon/child/sand/PolygonSand.sol:PolygonSand", + "label": "_admin", + "offset": 0, + "slot": "0", + "type": "t_address" + }, + { + "astId": 17114, + "contract": "src/solc_0.8/polygon/child/sand/PolygonSand.sol:PolygonSand", + "label": "_superOperators", + "offset": 0, + "slot": "1", + "type": "t_mapping(t_address,t_bool)" + }, + { + "astId": 14160, + "contract": "src/solc_0.8/polygon/child/sand/PolygonSand.sol:PolygonSand", + "label": "_name", + "offset": 0, + "slot": "2", + "type": "t_string_storage" + }, + { + "astId": 14162, + "contract": "src/solc_0.8/polygon/child/sand/PolygonSand.sol:PolygonSand", + "label": "_symbol", + "offset": 0, + "slot": "3", + "type": "t_string_storage" + }, + { + "astId": 14166, + "contract": "src/solc_0.8/polygon/child/sand/PolygonSand.sol:PolygonSand", + "label": "_totalSupply", + "offset": 0, + "slot": "4", + "type": "t_uint256" + }, + { + "astId": 14170, + "contract": "src/solc_0.8/polygon/child/sand/PolygonSand.sol:PolygonSand", + "label": "_balances", + "offset": 0, + "slot": "5", + "type": "t_mapping(t_address,t_uint256)" + }, + { + "astId": 14176, + "contract": "src/solc_0.8/polygon/child/sand/PolygonSand.sol:PolygonSand", + "label": "_allowances", + "offset": 0, + "slot": "6", + "type": "t_mapping(t_address,t_mapping(t_address,t_uint256))" + }, + { + "astId": 7, + "contract": "src/solc_0.8/polygon/child/sand/PolygonSand.sol:PolygonSand", + "label": "_owner", + "offset": 0, + "slot": "7", + "type": "t_address" + }, + { + "astId": 15059, + "contract": "src/solc_0.8/polygon/child/sand/PolygonSand.sol:PolygonSand", + "label": "_trustedForwarder", + "offset": 0, + "slot": "8", + "type": "t_address" + }, + { + "astId": 24410, + "contract": "src/solc_0.8/polygon/child/sand/PolygonSand.sol:PolygonSand", + "label": "childChainManagerProxy", + "offset": 0, + "slot": "9", + "type": "t_address" + } + ], + "types": { + "t_address": { + "encoding": "inplace", + "label": "address", + "numberOfBytes": "20" + }, + "t_bool": { + "encoding": "inplace", + "label": "bool", + "numberOfBytes": "1" + }, + "t_mapping(t_address,t_bool)": { + "encoding": "mapping", + "key": "t_address", + "label": "mapping(address => bool)", + "numberOfBytes": "32", + "value": "t_bool" + }, + "t_mapping(t_address,t_mapping(t_address,t_uint256))": { + "encoding": "mapping", + "key": "t_address", + "label": "mapping(address => mapping(address => uint256))", + "numberOfBytes": "32", + "value": "t_mapping(t_address,t_uint256)" + }, + "t_mapping(t_address,t_uint256)": { + "encoding": "mapping", + "key": "t_address", + "label": "mapping(address => uint256)", + "numberOfBytes": "32", + "value": "t_uint256" + }, + "t_string_storage": { + "encoding": "bytes", + "label": "string", + "numberOfBytes": "32" + }, + "t_uint256": { + "encoding": "inplace", + "label": "uint256", + "numberOfBytes": "32" + } + } + } +} \ No newline at end of file diff --git a/packages/deploy/deployments/polygon/TRUSTED_FORWARDER_V2.json b/packages/deploy/deployments/polygon/TRUSTED_FORWARDER_V2.json new file mode 100644 index 0000000..214604e --- /dev/null +++ b/packages/deploy/deployments/polygon/TRUSTED_FORWARDER_V2.json @@ -0,0 +1,618 @@ +{ + "address": "0xf0511f123164602042ab2bCF02111fA5D3Fe97CD", + "abi": [ + { + "inputs": [], + "stateMutability": "nonpayable", + "type": "constructor" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "bytes32", + "name": "domainSeparator", + "type": "bytes32" + }, + { + "indexed": false, + "internalType": "bytes", + "name": "domainValue", + "type": "bytes" + } + ], + "name": "DomainRegistered", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "userAddress", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "relayerAddress", + "type": "address" + }, + { + "indexed": true, + "internalType": "bytes", + "name": "functionSignature", + "type": "bytes" + } + ], + "name": "MetaTransactionExecuted", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "previousOwner", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "newOwner", + "type": "address" + } + ], + "name": "OwnershipTransferred", + "type": "event" + }, + { + "inputs": [], + "name": "CUSTOM_FORWARD_REQUEST_TYPEHASH", + "outputs": [ + { + "internalType": "bytes32", + "name": "", + "type": "bytes32" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "EIP712_DOMAIN_TYPE", + "outputs": [ + { + "internalType": "string", + "name": "", + "type": "string" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "FORWARD_REQUEST_TYPEHASH", + "outputs": [ + { + "internalType": "bytes32", + "name": "", + "type": "bytes32" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "REQUEST_TYPEHASH", + "outputs": [ + { + "internalType": "bytes32", + "name": "", + "type": "bytes32" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes32", + "name": "", + "type": "bytes32" + } + ], + "name": "domains", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "components": [ + { + "internalType": "address", + "name": "from", + "type": "address" + }, + { + "internalType": "address", + "name": "to", + "type": "address" + }, + { + "internalType": "address", + "name": "token", + "type": "address" + }, + { + "internalType": "uint256", + "name": "txGas", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "tokenGasPrice", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "batchId", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "batchNonce", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "deadline", + "type": "uint256" + }, + { + "internalType": "bytes", + "name": "data", + "type": "bytes" + } + ], + "internalType": "struct ForwardRequestTypesV2.ERC20ForwardRequest", + "name": "req", + "type": "tuple" + }, + { + "internalType": "bytes32", + "name": "domainSeparator", + "type": "bytes32" + }, + { + "internalType": "bytes", + "name": "sig", + "type": "bytes" + } + ], + "name": "executeEIP712", + "outputs": [ + { + "internalType": "bool", + "name": "success", + "type": "bool" + }, + { + "internalType": "bytes", + "name": "ret", + "type": "bytes" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "components": [ + { + "internalType": "string", + "name": "warning", + "type": "string" + }, + { + "internalType": "string", + "name": "info", + "type": "string" + }, + { + "internalType": "string", + "name": "action", + "type": "string" + }, + { + "components": [ + { + "internalType": "address", + "name": "from", + "type": "address" + }, + { + "internalType": "address", + "name": "to", + "type": "address" + }, + { + "internalType": "address", + "name": "token", + "type": "address" + }, + { + "internalType": "uint256", + "name": "txGas", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "tokenGasPrice", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "batchId", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "batchNonce", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "deadline", + "type": "uint256" + }, + { + "internalType": "bytes", + "name": "data", + "type": "bytes" + } + ], + "internalType": "struct ForwardRequestTypesV2.ERC20ForwardRequest", + "name": "request", + "type": "tuple" + } + ], + "internalType": "struct ForwardRequestTypesV2.CustomForwardRequest", + "name": "req", + "type": "tuple" + }, + { + "internalType": "bytes32", + "name": "domainSeparator", + "type": "bytes32" + }, + { + "internalType": "bytes", + "name": "sig", + "type": "bytes" + } + ], + "name": "executeEIP712Custom", + "outputs": [ + { + "internalType": "bool", + "name": "success", + "type": "bool" + }, + { + "internalType": "bytes", + "name": "ret", + "type": "bytes" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "components": [ + { + "internalType": "address", + "name": "from", + "type": "address" + }, + { + "internalType": "address", + "name": "to", + "type": "address" + }, + { + "internalType": "address", + "name": "token", + "type": "address" + }, + { + "internalType": "uint256", + "name": "txGas", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "tokenGasPrice", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "batchId", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "batchNonce", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "deadline", + "type": "uint256" + }, + { + "internalType": "bytes", + "name": "data", + "type": "bytes" + } + ], + "internalType": "struct ForwardRequestTypesV2.ERC20ForwardRequest", + "name": "req", + "type": "tuple" + }, + { + "internalType": "bytes", + "name": "sig", + "type": "bytes" + } + ], + "name": "executePersonalSign", + "outputs": [ + { + "internalType": "bool", + "name": "success", + "type": "bool" + }, + { + "internalType": "bytes", + "name": "ret", + "type": "bytes" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "from", + "type": "address" + }, + { + "internalType": "uint256", + "name": "batchId", + "type": "uint256" + } + ], + "name": "getNonce", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "owner", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "string", + "name": "name", + "type": "string" + }, + { + "internalType": "string", + "name": "version", + "type": "string" + } + ], + "name": "registerDomainSeparator", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "renounceOwnership", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "newOwner", + "type": "address" + } + ], + "name": "transferOwnership", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "components": [ + { + "internalType": "address", + "name": "from", + "type": "address" + }, + { + "internalType": "address", + "name": "to", + "type": "address" + }, + { + "internalType": "address", + "name": "token", + "type": "address" + }, + { + "internalType": "uint256", + "name": "txGas", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "tokenGasPrice", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "batchId", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "batchNonce", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "deadline", + "type": "uint256" + }, + { + "internalType": "bytes", + "name": "data", + "type": "bytes" + } + ], + "internalType": "struct ForwardRequestTypesV2.ERC20ForwardRequest", + "name": "req", + "type": "tuple" + }, + { + "internalType": "bytes32", + "name": "domainSeparator", + "type": "bytes32" + }, + { + "internalType": "bytes", + "name": "sig", + "type": "bytes" + } + ], + "name": "verifyEIP712", + "outputs": [], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "components": [ + { + "internalType": "address", + "name": "from", + "type": "address" + }, + { + "internalType": "address", + "name": "to", + "type": "address" + }, + { + "internalType": "address", + "name": "token", + "type": "address" + }, + { + "internalType": "uint256", + "name": "txGas", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "tokenGasPrice", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "batchId", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "batchNonce", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "deadline", + "type": "uint256" + }, + { + "internalType": "bytes", + "name": "data", + "type": "bytes" + } + ], + "internalType": "struct ForwardRequestTypesV2.ERC20ForwardRequest", + "name": "req", + "type": "tuple" + }, + { + "internalType": "bytes", + "name": "sig", + "type": "bytes" + } + ], + "name": "verifyPersonalSign", + "outputs": [], + "stateMutability": "view", + "type": "function" + } + ], + "receipt": { + "transactionHash": "0xcb03c68d95b2c7e2b769a1e10ac71c3ea86bcee7e7d597f1acafdb0c6431dd4c", + "blockNumber": 27363424 + } +} diff --git a/packages/deploy/deployments/rinkeby/.chainId b/packages/deploy/deployments/rinkeby/.chainId new file mode 100644 index 0000000..bf0d87a --- /dev/null +++ b/packages/deploy/deployments/rinkeby/.chainId @@ -0,0 +1 @@ +4 \ No newline at end of file diff --git a/packages/deploy/hardhat.config.ts b/packages/deploy/hardhat.config.ts new file mode 100644 index 0000000..ce3ffff --- /dev/null +++ b/packages/deploy/hardhat.config.ts @@ -0,0 +1,101 @@ +import 'dotenv/config'; +import '@nomiclabs/hardhat-ethers'; // aliased to hardhat-deploy-ethers +import 'hardhat-deploy'; +import 'hardhat-dependency-compiler'; +import {accounts, addSourceFiles, nodeUrl} from "./utils/hardhatConfig"; +import "./tasks/printFQN"; +import "./tasks/extendDeployTask"; + +const networks = { + /** + * TAGS: + * - mainnet -> production networks (you must pay for gas!!!) + * - L1 -> Layer 1 networks + * - L2 -> Layer 2 networks + */ + hardhat: { + accounts: accounts(process.env.HARDHAT_FORK), + tags: ['L1', 'L2'], + companionNetworks: { + l1: 'hardhat', + l2: 'hardhat', + }, + blockGasLimit: + parseInt(process.env.HARDHAT_BLOCK_GAS_LIMIT || '0') || 30000000, + }, + goerli: { + url: nodeUrl('goerli'), + accounts: accounts('goerli'), + tags: ['L1'], + // gasPrice: 600000000000, // Uncomment in case of pending txs, and adjust gas + companionNetworks: { + l2: 'mumbai', + }, + }, + mainnet: { + url: nodeUrl('mainnet'), + accounts: accounts('mainnet'), + tags: ['mainnet', 'L1'], + companionNetworks: { + l2: 'polygon', + }, + }, + mumbai: { + url: nodeUrl('mumbai'), + accounts: accounts('mumbai'), + tags: ['L2'], + //gasPrice: 600000000000, // TODO: this fixes invalid sender issue + companionNetworks: { + l1: 'goerli', + }, + }, + polygon: { + url: nodeUrl('polygon'), + accounts: accounts('polygon'), + tags: ['mainnet', 'L2'], + companionNetworks: { + l1: 'mainnet', + }, + }, +}; +const compilers = ['0.8.15', '0.8.2', '0.7.5', '0.6.5', '0.5.9',].map(version => ( + { + version, + settings: { + optimizer: { + enabled: true, + runs: 2000, + }, + }, + })); +const config = { + mocha: { + timeout: 0, + ...(!process.env.CI ? {} : {invert: true, grep: '@skip-on-ci'}), + }, + solidity: { + compilers + }, + networks, + namedAccounts: { + deployer: { + default: 1, + ethereum: '0xe19ae8F9B36Ca43D12741288D0e311396140DF6F', + polygon: '0x7074BB056C53ACC0b6091dd3FAe591aa3A4acC88', + goerli: '0xA796AE911621E00809E0E7C8f0AD6BF118E5139e', + mumbai: '0x5F890c9522dCE5670d741D4277BFCC2d9cA8Af02', + }, // deploy contracts and make sure they are set up correctly + sandAdmin: { + default: 2, + ethereum: '0xeaa0993e1d21c2103e4f172a20d29371fbaf6d06', + polygon: '0xfD30a48Bc6c56E24B0ebF1B0117d750e2CFf7531', + goerli: '0x39D01ecc951C2c1f20ba0549e62212659c4d1e06', + mumbai: '0x49c4D4C94829B9c44052C5f5Cb164Fc612181165', + }, // can add super operators and change admin + upgradeAdmin: 'sandAdmin', + sandBeneficiary: 'sandAdmin', // will be the owner of all initial SAND + sandExecutionAdmin: 'sandAdmin', // can add execution extension to SAND (used for Native metatx support) + }, +}; + +export default addSourceFiles(config); diff --git a/packages/deploy/package.json b/packages/deploy/package.json new file mode 100644 index 0000000..c1fdf7e --- /dev/null +++ b/packages/deploy/package.json @@ -0,0 +1,41 @@ +{ + "name": "deploy", + "version": "0.0.1", + "description": "TheSandbox game smart contracts deployment", + "repository": { + "type": "git", + "url": "https://github.com/thesandboxgame/contracts.git" + }, + "keywords": [], + "author": "", + "license": "MIT", + "bugs": { + "url": "https://github.com/thesandboxgame/contracts/issues" + }, + "homepage": "https://github.com/thesandboxgame/contracts#readme", + "private": true, + "dependencies": { + "@nomiclabs/hardhat-ethers": "npm:hardhat-deploy-ethers", + "@types/fs-extra": "^11.0.1", + "@types/mocha": "^10.0.1", + "@urql/core": "^3.1.1", + "cross-env": "^7.0.3", + "dotenv": "^16.0.3", + "dotenv-cli": "^7.0.0", + "ethers": "^5.7.2", + "fs-extra": "^7.0.1", + "hardhat": "^2.12.7", + "hardhat-dependency-compiler": "^1.1.3", + "hardhat-deploy": "^0.11.23", + "mocha": "^10.2.0", + "ts-node": "^10.9.1", + "typescript": "^4.0.5", + "sandbox-smart-contracts-0.0.30": "git+https://github.com/thesandboxgame/sandbox-smart-contracts.git#release_0.0.30" + }, + "scripts": { + "test": "dotenv -- cross-env NODE_OPTIONS=\"--max-old-space-size=8192 node --unhandled-rejections=strict\" HARDHAT_COMPILE=true NODE_ENV=test hardhat test", + "compile": "hardhat compile", + "void:deploy": "dotenv -- cross-env NODE_OPTIONS=\"--max-old-space-size=8192 --unhandled-rejections=strict\" hardhat deploy", + "hardhat": "hardhat" + } +} diff --git a/packages/deploy/tasks/extendDeployTask.ts b/packages/deploy/tasks/extendDeployTask.ts new file mode 100644 index 0000000..62c4dc2 --- /dev/null +++ b/packages/deploy/tasks/extendDeployTask.ts @@ -0,0 +1,28 @@ +import {extendEnvironment, task} from "hardhat/config"; +import {TASK_DEPLOY_RUN_DEPLOY} from "hardhat-deploy"; +import {isInTags} from "../utils/deploymentSkip"; + +declare module 'hardhat/types/runtime' { + interface HardhatRuntimeEnvironment { + tagFilter: string[]; + } +} + +extendEnvironment(hre => { + // Used to specifically skip some deployments if needed + hre.tagFilter = []; +}); + +task(TASK_DEPLOY_RUN_DEPLOY, 'Deploy contracts') + .addOptionalParam("tagFilter", "skip deployment script that don't have this tag") + .setAction(async (args, hre, runSuper) => { + if (!args.tags && isInTags(hre, "mainnet")) { + throw new Error('on mainnet use some tag, maybe production is the right one') + } + if (args.tagFilter) { + hre.tagFilter = args.tagFilter.split(",") + } + await runSuper(args); + hre.tagFilter = []; + }); + diff --git a/packages/deploy/tasks/printFQN.ts b/packages/deploy/tasks/printFQN.ts new file mode 100644 index 0000000..5ff2f57 --- /dev/null +++ b/packages/deploy/tasks/printFQN.ts @@ -0,0 +1,7 @@ +// A hack to set the FQN for the contracts to latest +import {task} from "hardhat/config"; + +task("printFQN", async function (args, hre, runSuper) { + const fqns = await hre.artifacts.getAllFullyQualifiedNames(); + console.log(fqns.filter(x => x.startsWith("sandbox")).join("\n")) +}); diff --git a/packages/deploy/test/deployments.ts b/packages/deploy/test/deployments.ts new file mode 100644 index 0000000..c9844af --- /dev/null +++ b/packages/deploy/test/deployments.ts @@ -0,0 +1,77 @@ +import hre, {deployments} from "hardhat"; +import '@nomiclabs/hardhat-ethers'; // aliased to hardhat-deploy-ethers +import {TASK_DEPLOY_RUN_DEPLOY} from "hardhat-deploy"; +import {loadAllDeployments} from "hardhat-deploy/dist/src/utils"; +import {Deployment} from "hardhat-deploy/types"; +import {HARDHAT_NETWORK_NAME} from "hardhat/plugins"; +import {expect} from "chai"; +import {withSnapshot} from "../utils/testUtils"; + +type Deployments = { [name: string]: Deployment }; + +async function getDeployments(chainId: number): Promise { + const deployedContracts = await loadAllDeployments( + hre, + hre.config.paths.deployments, + false, + {}) + return deployedContracts[chainId][0].contracts; +} + +export const setupTest = withSnapshot<{ [name: string]: Deployment }, string>([], async (hre, tagFilter): Promise => { + await hre.run(TASK_DEPLOY_RUN_DEPLOY, { + tags: "production", + tagFilter, + reset: true, + write: false + }); + return deployments.all(); + } +); + +async function deploymentTest(deploymentsContracts: Deployments, compiledContracts: { [name: string]: Deployment }) { + const names = Object.keys(deploymentsContracts); + for (const name of names) { + const deployment = deploymentsContracts[name]; + const compiled = compiledContracts[name]; + delete compiledContracts[name]; + + // This is ok, is just a reference to external contracts like trustedForwarder, etc. + if (!deployment.bytecode) { + continue; + } + + if (!compiled) { + console.warn(`contract ${name} is not deployed`); + continue; + } + + // skip proxies, we will check the implementation later. + if (names.some(x => x === name + "_Proxy") && names.some(x => x === name + "_Implementation")) { + if (deploymentsContracts[name + "_Proxy"].address != deployment.address) { + console.warn(`contract ${name} has a proxy that don't match ${deploymentsContracts[name + "_Proxy"].address} != ${deployment.address}`); + } + console.log(`contract ${name} has a proxy, skip`); + } + } + expect(Object.keys(compiledContracts)).to.be.eql([]) +} + +describe('deployed contract should match the deployment directory', function () { + it('ethereum', async function () { + this.timeout(5000000); + expect(hre.network.name).to.be.eq(HARDHAT_NETWORK_NAME) + + const compiledContracts = await setupTest("L1"); + const deploymentsContracts = await getDeployments(1); + await deploymentTest(deploymentsContracts, compiledContracts) + }); + + it('polygon', async function () { + this.timeout(5000000); + expect(hre.network.name).to.be.eq(HARDHAT_NETWORK_NAME) + const compiledContracts = await setupTest("L2"); + const deploymentsContracts = await getDeployments(137); + await deploymentTest(deploymentsContracts, compiledContracts) + }); +}) diff --git a/packages/deploy/utils/deploymentSkip.ts b/packages/deploy/utils/deploymentSkip.ts new file mode 100644 index 0000000..e951af6 --- /dev/null +++ b/packages/deploy/utils/deploymentSkip.ts @@ -0,0 +1,32 @@ +import 'dotenv/config'; +import {HardhatRuntimeEnvironment} from 'hardhat/types'; + +export function unless(...funcs: ((hre: HardhatRuntimeEnvironment) => boolean)[]): (hre: HardhatRuntimeEnvironment) => Promise { + return async (hre: HardhatRuntimeEnvironment) => !funcs.every(x => x(hre)); +} + +export function isL1(hre: HardhatRuntimeEnvironment): boolean { + return isInTags(hre, 'L1'); +} + +export function isL2(hre: HardhatRuntimeEnvironment): boolean { + return isInTags(hre, 'L2'); +} + +// This is just an extra security measure so we avoid deploying external contracts to mainnet +export function isNotMainnet(hre: HardhatRuntimeEnvironment): boolean { + return !isInTags(hre, 'mainnet'); +} + +// Helper function to fix a bug in hardhat-deploy for the "hardhat" network. +export function isInTags(hre: HardhatRuntimeEnvironment, key: string): boolean { + // Tag filter is used specifically for testing, for example to run hardhat but as L1 layer alone + if (hre.tagFilter && hre.tagFilter.length > 0 && !hre.tagFilter.includes(key)) { + return false; + } + return ( + (hre.network.tags && hre.network.tags[key]) || + (hre.network.config.tags && hre.network.config.tags.includes(key)) + ); +} + diff --git a/packages/deploy/utils/hardhatConfig.ts b/packages/deploy/utils/hardhatConfig.ts new file mode 100644 index 0000000..4ad7d12 --- /dev/null +++ b/packages/deploy/utils/hardhatConfig.ts @@ -0,0 +1,70 @@ +import {HardhatUserConfig} from 'hardhat/types'; +import path from 'path'; +import {traverse} from 'hardhat-deploy/dist/src/utils'; +import fs from "fs"; + +export function nodeUrl(networkName: string): string { + if (networkName) { + const uri = process.env['ETH_NODE_URI_' + networkName.toUpperCase()]; + if (uri && uri !== '') { + return uri; + } + } + + let uri = process.env.ETH_NODE_URI; + if (uri) { + uri = uri.replace('{{networkName}}', networkName); + } + if (!uri || uri === '') { + // throw new Error(`environment variable "ETH_NODE_URI" not configured `); + return ''; + } + if (uri.indexOf('{{') >= 0) { + throw new Error( + `invalid uri or network not supported by node provider : ${uri}` + ); + } + return uri; +} + +export function getMnemonic(networkName?: string): string { + if (networkName) { + const mnemonic = process.env['MNEMONIC_' + networkName.toUpperCase()]; + if (mnemonic && mnemonic !== '') { + return mnemonic; + } + } + + const mnemonic = process.env.MNEMONIC; + if (!mnemonic || mnemonic === '') { + return 'test test test test test test test test test test test junk'; + } + return mnemonic; +} + +export function accounts(networkName?: string): { mnemonic: string } { + return {mnemonic: getMnemonic(networkName)}; +} + +export function addSourceFiles(initial: HardhatUserConfig): HardhatUserConfig { + // const path = await import('path'); + const dirs = require.main ? require.main.paths.filter(fs.existsSync) + .map(d => fs.readdirSync(d).filter(x => x.startsWith('sandbox-smart-contracts')).map(f => path.join(d, f))) + .flat() : [] + let paths: string[] = []; + for (const d of dirs) { + const entries = traverse(d, [], d, + (name, stats) => !name.startsWith('.') && name != "node_modules" && (stats.isDirectory() || name.endsWith('.sol')) + ).filter(x => !x.directory); + const b = path.basename(d); + paths = [...paths, ...entries.map(x => path.join(b, x.relativePath))]; + } + + return { + ...initial, + dependencyCompiler: { + ...initial.dependencyCompiler, + paths: [...(initial.dependencyCompiler && initial.dependencyCompiler.paths || []), ...paths] + } + }; +} diff --git a/packages/deploy/utils/testUtils.ts b/packages/deploy/utils/testUtils.ts new file mode 100644 index 0000000..e9fb055 --- /dev/null +++ b/packages/deploy/utils/testUtils.ts @@ -0,0 +1,25 @@ +import {FixtureFunc} from "hardhat-deploy/dist/types"; +import {deployments} from "hardhat"; +import {HardhatRuntimeEnvironment} from "hardhat/types"; + +export function withSnapshot( + tags: string | string[] = [], + func: FixtureFunc = async () => { + return {}; + } +): (options?: O) => Promise { + return deployments.createFixture( + async (env: HardhatRuntimeEnvironment, options?: O) => { + // TODO: This has problems with solidity-coverage, when the fix that we can use it + // TODO: We need a way to revert to initial state!!! + // await evmRevertToInitialState(); + await deployments.fixture(tags, { + fallbackToGlobal: false, + keepExistingDeployments: false, + }); + return func(env, options); + } + ); +} + + diff --git a/yarn.lock b/yarn.lock index e0dee0c..1b89f57 100644 --- a/yarn.lock +++ b/yarn.lock @@ -369,6 +369,13 @@ "@jridgewell/resolve-uri" "^3.0.3" "@jridgewell/sourcemap-codec" "^1.4.10" +"@maticnetwork/fx-portal@^1.0.5": + version "1.0.5" + resolved "https://registry.yarnpkg.com/@maticnetwork/fx-portal/-/fx-portal-1.0.5.tgz#c26bc0bdf979985f22223d2f1170171a10fa0764" + integrity sha512-kDob22IkLLrh+OmjpgM0r2jNboW+8cTwGL7sSEvmMcqujlun3Dw7+o741qWeubLovCEw0n2nxhYWLwt8iNVecQ== + dependencies: + "@openzeppelin/contracts" "^4.2.0" + "@metamask/eth-sig-util@^4.0.0": version "4.0.1" resolved "https://registry.yarnpkg.com/@metamask/eth-sig-util/-/eth-sig-util-4.0.1.tgz#3ad61f6ea9ad73ba5b19db780d40d9aae5157088" @@ -645,6 +652,11 @@ resolved "https://registry.yarnpkg.com/@nomiclabs/hardhat-ethers/-/hardhat-ethers-2.2.2.tgz#812d48929c3bf8fe840ec29eab4b613693467679" integrity sha512-NLDlDFL2us07C0jB/9wzvR0kuLivChJWCXTKcj3yqjZqMoYp7g7wwS157F70VHx/+9gHIBGzak5pKDwG8gEefA== +"@nomiclabs/hardhat-ethers@npm:hardhat-deploy-ethers": + version "0.3.0-beta.13" + resolved "https://registry.yarnpkg.com/hardhat-deploy-ethers/-/hardhat-deploy-ethers-0.3.0-beta.13.tgz#b96086ff768ddf69928984d5eb0a8d78cfca9366" + integrity sha512-PdWVcKB9coqWV1L7JTpfXRCI91Cgwsm7KLmBcwZ8f0COSm1xtABHZTyz3fvF6p42cTnz1VM0QnfDvMFlIRkSNw== + "@nomiclabs/hardhat-etherscan@^3.1.6": version "3.1.6" resolved "https://registry.yarnpkg.com/@nomiclabs/hardhat-etherscan/-/hardhat-etherscan-3.1.6.tgz#7e50aeb06501a0060655664599d9e35cfd475929" @@ -661,6 +673,64 @@ table "^6.8.0" undici "^5.14.0" +"@openzeppelin/contracts-0.6@npm:@openzeppelin/contracts@3.2.0": + version "3.2.0" + resolved "https://registry.yarnpkg.com/@openzeppelin/contracts/-/contracts-3.2.0.tgz#3e6b3a7662d8ed64271ade96ef42655db983fd9d" + integrity sha512-bUOmkSoPkjnUyMiKo6RYnb0VHBk5D9KKDAgNLzF41aqAM3TeE0yGdFF5dVRcV60pZdJLlyFT/jjXIZCWyyEzAQ== + +"@openzeppelin/contracts-0.8.13@npm:@openzeppelin/contracts@4.8.0": + version "4.8.0" + resolved "https://registry.yarnpkg.com/@openzeppelin/contracts/-/contracts-4.8.0.tgz#6854c37df205dd2c056bdfa1b853f5d732109109" + integrity sha512-AGuwhRRL+NaKx73WKRNzeCxOCOCxpaqF+kp8TJ89QzAipSwZy/NoflkWaL9bywXFRhIzXt8j38sfF7KBKCPWLw== + +"@openzeppelin/contracts-0.8@npm:@openzeppelin/contracts@4.4.2": + version "4.4.2" + resolved "https://registry.yarnpkg.com/@openzeppelin/contracts/-/contracts-4.4.2.tgz#4e889c9c66e736f7de189a53f8ba5b8d789425c2" + integrity sha512-NyJV7sJgoGYqbtNUWgzzOGW4T6rR19FmX1IJgXGdapGPWsuMelGJn9h03nos0iqfforCbCB0iYIR0MtIuIFLLw== + +"@openzeppelin/contracts-upgradeable-0.8.13@npm:@openzeppelin/contracts-upgradeable@4.8.0": + version "4.8.0" + resolved "https://registry.yarnpkg.com/@openzeppelin/contracts-upgradeable/-/contracts-upgradeable-4.8.0.tgz#26688982f46969018e3ed3199e72a07c8d114275" + integrity sha512-5GeFgqMiDlqGT8EdORadp1ntGF0qzWZLmEY7Wbp/yVhN7/B3NNzCxujuI77ktlyG81N3CUZP8cZe3ZAQ/cW10w== + +"@openzeppelin/contracts-upgradeable@4.4.2": + version "4.4.2" + resolved "https://registry.yarnpkg.com/@openzeppelin/contracts-upgradeable/-/contracts-upgradeable-4.4.2.tgz#748a5986a02548ef541cabc2ce8c67a890044c40" + integrity sha512-bavxs18L47EmcdnL9I6DzsVSUJO+0/zD6zH7/6qG7QRBugvR3VNVZR+nMvuZlCNwuTTnCa3apR00PYzYr/efAw== + +"@openzeppelin/contracts@^3.2.1-solc-0.7": + version "3.4.2" + resolved "https://registry.yarnpkg.com/@openzeppelin/contracts/-/contracts-3.4.2.tgz#d81f786fda2871d1eb8a8c5a73e455753ba53527" + integrity sha512-z0zMCjyhhp4y7XKAcDAi3Vgms4T2PstwBdahiO0+9NaGICQKjynK3wduSRplTgk4LXmoO1yfDGO5RbjKYxtuxA== + +"@openzeppelin/contracts@^4.2.0": + version "4.8.1" + resolved "https://registry.yarnpkg.com/@openzeppelin/contracts/-/contracts-4.8.1.tgz#709cfc4bbb3ca9f4460d60101f15dac6b7a2d5e4" + integrity sha512-xQ6eUZl+RDyb/FiZe1h+U7qr/f4p/SrTSQcTPH2bjur3C5DbuW/zFgCU/b1P/xcIaEqJep+9ju4xDRi3rmChdQ== + +"@openzeppelin/hardhat-upgrades@^1.4.3": + version "1.22.1" + resolved "https://registry.yarnpkg.com/@openzeppelin/hardhat-upgrades/-/hardhat-upgrades-1.22.1.tgz#93e2b3f870c57b00a1ae8a330a2cdd9c2d634eb8" + integrity sha512-MdoitCTLl4zwMU8MeE/bCj+7JMWBEvd38XqJkw36PkJrXlbv6FedDVCPoumMAhpmtymm0nTwTYYklYG+L6WiiQ== + dependencies: + "@openzeppelin/upgrades-core" "^1.20.0" + chalk "^4.1.0" + debug "^4.1.1" + proper-lockfile "^4.1.1" + +"@openzeppelin/upgrades-core@^1.20.0": + version "1.24.0" + resolved "https://registry.yarnpkg.com/@openzeppelin/upgrades-core/-/upgrades-core-1.24.0.tgz#4273a6d77922d0b3d20e09267bd9d2648ccb5cc0" + integrity sha512-lXf1tUrCZ3Q/YmWhw0cuSSOHMp0OAsmeOg1fhSGEM6nQQ6cIVlFvq2pCV5hZMb7xkOm5pmmzV8JW1W3kfW6Lfw== + dependencies: + cbor "^8.0.0" + chalk "^4.1.0" + compare-versions "^5.0.0" + debug "^4.1.1" + ethereumjs-util "^7.0.3" + proper-lockfile "^4.1.1" + solidity-ast "^0.4.15" + "@scure/base@~1.1.0": version "1.1.1" resolved "https://registry.yarnpkg.com/@scure/base/-/base-1.1.1.tgz#ebb651ee52ff84f420097055f4bf46cfba403938" @@ -838,6 +908,14 @@ dependencies: "@types/node" "*" +"@types/fs-extra@^11.0.1": + version "11.0.1" + resolved "https://registry.yarnpkg.com/@types/fs-extra/-/fs-extra-11.0.1.tgz#f542ec47810532a8a252127e6e105f487e0a6ea5" + integrity sha512-MxObHvNl4A69ofaTRU8DFqvgzzv8s9yRtaPPm5gud9HDNvpB3GPQFvNuTWAI59B9huVGV5jXYJwbCsmBsOGYWA== + dependencies: + "@types/jsonfile" "*" + "@types/node" "*" + "@types/glob@^7.1.1": version "7.2.0" resolved "https://registry.yarnpkg.com/@types/glob/-/glob-7.2.0.tgz#bc1b5bf3aa92f25bd5dd39f35c57361bdce5b2eb" @@ -846,6 +924,13 @@ "@types/minimatch" "*" "@types/node" "*" +"@types/jsonfile@*": + version "6.1.1" + resolved "https://registry.yarnpkg.com/@types/jsonfile/-/jsonfile-6.1.1.tgz#ac84e9aefa74a2425a0fb3012bdea44f58970f1b" + integrity sha512-GSgiRCVeapDN+3pqA35IkQwasaCh/0YFH5dEF6S88iDvEn901DjOeH3/QPY+XYP1DFzDZPvIvfeEgk+7br5png== + dependencies: + "@types/node" "*" + "@types/lru-cache@^5.1.0": version "5.1.1" resolved "https://registry.yarnpkg.com/@types/lru-cache/-/lru-cache-5.1.1.tgz#c48c2e27b65d2a153b19bfc1a317e30872e01eef" @@ -888,7 +973,7 @@ resolved "https://registry.yarnpkg.com/@types/prettier/-/prettier-2.7.2.tgz#6c2324641cc4ba050a8c710b2b251b377581fbf0" integrity sha512-KufADq8uQqo1pYKVIYzfKbJfBAc0sOeXqGbFaSpv8MRmC/zXgowNZmFcbngndGk922QDmOASEXUZCaY48gs4cg== -"@types/qs@^6.2.31": +"@types/qs@^6.2.31", "@types/qs@^6.9.7": version "6.9.7" resolved "https://registry.yarnpkg.com/@types/qs/-/qs-6.9.7.tgz#63bb7d067db107cc1e457c303bc25d511febf6cb" integrity sha512-FGa1F62FT09qcrueBA6qYTrJPVDzah9a+493+o2PCXsesWHIn27G98TsSMs3WPNbZIEj4+VJf6saSFpvD+3Zsw== @@ -900,6 +985,13 @@ dependencies: "@types/node" "*" +"@urql/core@^3.1.1": + version "3.1.1" + resolved "https://registry.yarnpkg.com/@urql/core/-/core-3.1.1.tgz#a49cd572360d01f2469a786b294fba2269a65e53" + integrity sha512-Mnxtq4I4QeFJsgs7Iytw+HyhiGxISR6qtyk66c9tipozLZ6QVxrCiUPF2HY4BxNIabaxcp+rivadvm8NAnXj4Q== + dependencies: + wonka "^6.1.2" + abbrev@1: version "1.1.1" resolved "https://registry.yarnpkg.com/abbrev/-/abbrev-1.1.1.tgz#f8f2c887ad10bf67f634f005b6987fed3179aac8" @@ -1178,6 +1270,13 @@ aws4@^1.8.0: resolved "https://registry.yarnpkg.com/aws4/-/aws4-1.12.0.tgz#ce1c9d143389679e253b314241ea9aa5cec980d3" integrity sha512-NmWvPnx0F1SfrQbYwOi7OeaNGokp9XhzNioJ/CSBs8Qa4vxug81mhJEAVZwxXuBmYB5KDRfMq/F3RR0BIU7sWg== +axios@^0.21.1: + version "0.21.4" + resolved "https://registry.yarnpkg.com/axios/-/axios-0.21.4.tgz#c67b90dc0568e5c1cf2b0b858c43ba28e2eda575" + integrity sha512-ut5vewkiu8jjGBdqpM44XxjuCjq9LAKeHVmoVfHVzy8eHgxxq8SbAVQNovDA8mVi05kP0Ea/n/UzcSHcTJQfNg== + dependencies: + follow-redirects "^1.14.0" + balanced-match@^1.0.0: version "1.0.2" resolved "https://registry.yarnpkg.com/balanced-match/-/balanced-match-1.0.2.tgz#e83e3a7e3f300b34cb9d87f615fa0cbf357690ee" @@ -1372,7 +1471,7 @@ catering@^2.1.0, catering@^2.1.1: resolved "https://registry.yarnpkg.com/catering/-/catering-2.1.1.tgz#66acba06ed5ee28d5286133982a927de9a04b510" integrity sha512-K7Qy8O9p76sL3/3m7/zLKbRkyOlSZAgzEaLhyj2mXS8PsCud2Eo4hAb8aLtZqHh0QGqLcb9dlJSu6lHRVENm1w== -cbor@^8.1.0: +cbor@^8.0.0, cbor@^8.1.0: version "8.1.0" resolved "https://registry.yarnpkg.com/cbor/-/cbor-8.1.0.tgz#cfc56437e770b73417a2ecbfc9caf6b771af60d5" integrity sha512-DwGjNW9omn6EwP70aXsn7FQJx5kO12tX0bZkaTjzdVFM6/7nhA4t0EENocKGx6D2Bch9PE2KzCUf5SceBdeijg== @@ -1408,7 +1507,7 @@ chalk@^2.4.2: escape-string-regexp "^1.0.5" supports-color "^5.3.0" -chalk@^4.1.0: +chalk@^4.1.0, chalk@^4.1.2: version "4.1.2" resolved "https://registry.yarnpkg.com/chalk/-/chalk-4.1.2.tgz#aac4e2b7734a740867aeb16bf02aad556a1e7a01" integrity sha512-oKnbhFyRIXpUuez8iBMmyEa4nbj4IOQyuhc/wy9kY7/WVPcwIO9VA668Pu8RkO7+0G76SLROeyw9CpQ061i4mA== @@ -1441,7 +1540,7 @@ chokidar@3.3.0: optionalDependencies: fsevents "~2.1.1" -chokidar@3.5.3, chokidar@^3.4.0: +chokidar@3.5.3, chokidar@^3.4.0, chokidar@^3.5.2: version "3.5.3" resolved "https://registry.yarnpkg.com/chokidar/-/chokidar-3.5.3.tgz#1cf37c8707b932bd1af1ae22c0432e2acd1903bd" integrity sha512-Dr3sfKRP6oTcjf2JmUmFJfeVMvXBdegxB0iVQ5eb2V10uFJUCAS8OByZdVAyVb8xXNz3GjjTgj9kLWsZTqE6kw== @@ -1542,7 +1641,7 @@ colors@1.4.0, colors@^1.1.2: resolved "https://registry.yarnpkg.com/colors/-/colors-1.4.0.tgz#c50491479d4c1bdaed2c9ced32cf7c7dc2360f78" integrity sha512-a+UqTh4kgZg/SlGvfbzDHpgRu7AAQOmmqRHJnxhRZICKFUT91brVhNNt58CMWU9PsBbv3PDCZUHbVxuDiH2mtA== -combined-stream@^1.0.6, combined-stream@~1.0.6: +combined-stream@^1.0.6, combined-stream@^1.0.8, combined-stream@~1.0.6: version "1.0.8" resolved "https://registry.yarnpkg.com/combined-stream/-/combined-stream-1.0.8.tgz#c3d45a8b34fd730631a110a8a2520682b31d5a7f" integrity sha512-FQN4MRfuJeHf7cBbBMJFXhKSDq+2kAArBlmRBvcvFE5BB1HZKXtSFASDhdlz9zOYwxh8lDdnvmMOe/+5cdoEdg== @@ -1579,6 +1678,11 @@ commander@3.0.2: resolved "https://registry.yarnpkg.com/commander/-/commander-3.0.2.tgz#6837c3fb677ad9933d1cfba42dd14d5117d6b39e" integrity sha512-Gar0ASD4BDyKC4hl4DwHqDrmvjoxWKZigVnAbn5H1owvm4CxCPdb0HQDehwNYMJpla5+M2tPmPARzhtYuwpHow== +compare-versions@^5.0.0: + version "5.0.3" + resolved "https://registry.yarnpkg.com/compare-versions/-/compare-versions-5.0.3.tgz#a9b34fea217472650ef4a2651d905f42c28ebfd7" + integrity sha512-4UZlZP8Z99MGEY+Ovg/uJxJuvoXuN4M6B3hKaiackiHrgzQFEe3diJi1mf1PNHbFujM7FvLrK2bpgIaImbtZ1A== + concat-map@0.0.1: version "0.0.1" resolved "https://registry.yarnpkg.com/concat-map/-/concat-map-0.0.1.tgz#d8a96bd77fd68df7793a73036a3ba0d5405d477b" @@ -1682,7 +1786,7 @@ debug@3.2.6: dependencies: ms "^2.1.1" -debug@4, debug@4.3.4, debug@^4.1.1, debug@^4.3.1, debug@^4.3.3: +debug@4, debug@4.3.4, debug@^4.1.1, debug@^4.3.1, debug@^4.3.2, debug@^4.3.3: version "4.3.4" resolved "https://registry.yarnpkg.com/debug/-/debug-4.3.4.tgz#1319f6579357f2338d3337d2cdd4914bb5dcc865" integrity sha512-PRWFHuSU3eDtQJPvnNY7Jcket1j0t5OuOsFzPPzsekD52Zl8qUfFIPEiswXqIvHWGVHOgX+7G/vCNNhehwxfkQ== @@ -1822,7 +1926,12 @@ emoji-regex@^8.0.0: resolved "https://registry.yarnpkg.com/emoji-regex/-/emoji-regex-8.0.0.tgz#e818fd69ce5ccfcb404594f842963bf53164cc37" integrity sha512-MSjYzcWNOA0ewAHpz0MxpYFvwg6yjy1NG3xteoqz644VCo/RPgnr1/GGt+ic3iJTzQ8Eu3TdM14SawnVUmGE6A== -enquirer@^2.3.0: +encode-utf8@^1.0.2: + version "1.0.3" + resolved "https://registry.yarnpkg.com/encode-utf8/-/encode-utf8-1.0.3.tgz#f30fdd31da07fb596f281beb2f6b027851994cda" + integrity sha512-ucAnuBEhUK4boH2HjVYG5Q2mQyPorvv0u/ocS+zhdw0S8AlHYY+GOFhP1Gio5z4icpP2ivFSvhtFjQi8+T9ppw== + +enquirer@^2.3.0, enquirer@^2.3.6: version "2.3.6" resolved "https://registry.yarnpkg.com/enquirer/-/enquirer-2.3.6.tgz#2a7fe5dd634a1e4125a975ec994ff5456dc3734d" integrity sha512-yjNnPr315/FjS4zIsUxYguYUPP2e1NK4d7E7ZOLiyYCcbFBiTMyID+2wvm2w6+pZ/odMA7cRkjhsPbltwBOrLg== @@ -2023,7 +2132,7 @@ ethereumjs-util@^6.0.0, ethereumjs-util@^6.2.1: ethjs-util "0.1.6" rlp "^2.2.3" -ethereumjs-util@^7.1.0, ethereumjs-util@^7.1.4: +ethereumjs-util@^7.0.3, ethereumjs-util@^7.1.0, ethereumjs-util@^7.1.4: version "7.1.5" resolved "https://registry.yarnpkg.com/ethereumjs-util/-/ethereumjs-util-7.1.5.tgz#9ecf04861e4fbbeed7465ece5f23317ad1129181" integrity sha512-SDl5kKrQAudFBUe5OJM9Ac6WmMyYmXX/6sTmLZ3ffG2eY6ZIGBes3pEDxNN6V72WyOw4CPD5RomKdsa8DAAwLg== @@ -2049,7 +2158,7 @@ ethers@^4.0.40: uuid "2.0.1" xmlhttprequest "1.8.0" -ethers@^5.6.2: +ethers@^5.5.3, ethers@^5.6.2, ethers@^5.7.2: version "5.7.2" resolved "https://registry.yarnpkg.com/ethers/-/ethers-5.7.2.tgz#3a7deeabbb8c030d4126b24f84e525466145872e" integrity sha512-wswUsmWo1aOK8rR7DIKiWSw9DbLWe6x98Jrn8wcTflTVvaXhAMaB5zGAXy0GYQEQp9iO1iSHWVyARQm11zUtyg== @@ -2210,7 +2319,14 @@ flat@^5.0.2: resolved "https://registry.yarnpkg.com/flat/-/flat-5.0.2.tgz#8ca6fe332069ffa9d324c327198c598259ceb241" integrity sha512-b6suED+5/3rTpUBdG1gupIl8MPFCAMA0QXwmljLhvCUKcUvdE4gWky9zpuGCcXHOsz4J9wPGNWq6OKpmIzz3hQ== -follow-redirects@^1.12.1: +fmix@^0.1.0: + version "0.1.0" + resolved "https://registry.yarnpkg.com/fmix/-/fmix-0.1.0.tgz#c7bbf124dec42c9d191cfb947d0a9778dd986c0c" + integrity sha512-Y6hyofImk9JdzU8k5INtTXX1cu8LDlePWDFU5sftm9H+zKCr5SGrVjdhkvsim646cw5zD0nADj8oHyXMZmCZ9w== + dependencies: + imul "^1.0.0" + +follow-redirects@^1.12.1, follow-redirects@^1.14.0: version "1.15.2" resolved "https://registry.yarnpkg.com/follow-redirects/-/follow-redirects-1.15.2.tgz#b460864144ba63f2681096f274c4e57026da2c13" integrity sha512-VQLG33o04KaQ8uYi2tVNbdrWp1QWxNNea+nmIB4EVM28v0hmP17z7aG1+wAkNzVq4KeXTq3221ye5qTJP91JwA== @@ -2236,6 +2352,15 @@ form-data@^2.2.0: combined-stream "^1.0.6" mime-types "^2.1.12" +form-data@^4.0.0: + version "4.0.0" + resolved "https://registry.yarnpkg.com/form-data/-/form-data-4.0.0.tgz#93919daeaf361ee529584b9b31664dc12c9fa452" + integrity sha512-ETEklSGi5t0QMZuiXoA/Q6vcnxcLQP5vdugSpuAyi6SVGi2clPPp+xgEhuMaHC+zGgn31Kd235W35f7Hykkaww== + dependencies: + asynckit "^0.4.0" + combined-stream "^1.0.8" + mime-types "^2.1.12" + form-data@~2.3.2: version "2.3.3" resolved "https://registry.yarnpkg.com/form-data/-/form-data-2.3.3.tgz#dcce52c05f644f298c6a7ab936bd724ceffbf3a6" @@ -2266,6 +2391,15 @@ fs-extra@^0.30.0: path-is-absolute "^1.0.0" rimraf "^2.2.8" +fs-extra@^10.0.0: + version "10.1.0" + resolved "https://registry.yarnpkg.com/fs-extra/-/fs-extra-10.1.0.tgz#02873cfbc4084dde127eaa5f9905eef2325d1abf" + integrity sha512-oRXApq54ETRj4eMiFzGnHWGy+zo5raudjuxN0b8H7s/RU2oW0Wvsx9O0ACRN/kRq9E8Vu/ReskGB5o3ji+FzHQ== + dependencies: + graceful-fs "^4.2.0" + jsonfile "^6.0.1" + universalify "^2.0.0" + fs-extra@^7.0.0, fs-extra@^7.0.1: version "7.0.1" resolved "https://registry.yarnpkg.com/fs-extra/-/fs-extra-7.0.1.tgz#4f189c44aa123b895f722804f55ea23eadc348e9" @@ -2339,6 +2473,13 @@ functions-have-names@^1.2.2: resolved "https://registry.yarnpkg.com/functions-have-names/-/functions-have-names-1.2.3.tgz#0404fe4ee2ba2f607f0e0ec3c80bae994133b834" integrity sha512-xckBUXyTIqT97tq2x2AMb+g163b5JFysYk0x4qxNFwbfQkmNZoiRHb6sPzI9/QV33WeuvVYBUIiD4NzNIyqaRQ== +fx-portal@^1.0.3: + version "1.0.3" + resolved "https://registry.yarnpkg.com/fx-portal/-/fx-portal-1.0.3.tgz#6882497b1eb1a148716dbd762daf5b7ab511741b" + integrity sha512-wjjc/RQzHpjimeNVrOuLLwGBcjSzj0pTTaL26wAwTTrmaeeLrs2bcM4OldA0awZcaLqQXe3oQME8oC281jxzGw== + dependencies: + "@openzeppelin/contracts" "^4.2.0" + get-caller-file@^2.0.1, get-caller-file@^2.0.5: version "2.0.5" resolved "https://registry.yarnpkg.com/get-caller-file/-/get-caller-file-2.0.5.tgz#4f94412a82db32f36e3b0b9741f8a97feb031f7e" @@ -2496,7 +2637,7 @@ gopd@^1.0.1: dependencies: get-intrinsic "^1.1.3" -graceful-fs@^4.1.2, graceful-fs@^4.1.6, graceful-fs@^4.1.9, graceful-fs@^4.2.0: +graceful-fs@^4.1.2, graceful-fs@^4.1.6, graceful-fs@^4.1.9, graceful-fs@^4.2.0, graceful-fs@^4.2.4: version "4.2.10" resolved "https://registry.yarnpkg.com/graceful-fs/-/graceful-fs-4.2.10.tgz#147d3a006da4ca3ce14728c7aefc287c367d7a6c" integrity sha512-9ByhssR2fPVsNZj478qUUbKfmL0+t5BDVyjShtyZZLiK7ZDAArFFfopyOTj0M05wE2tJPisA4iTnnXl2YoPvOA== @@ -2531,6 +2672,30 @@ har-validator@~5.1.3: ajv "^6.12.3" har-schema "^2.0.0" +hardhat-dependency-compiler@^1.1.3: + version "1.1.3" + resolved "https://registry.yarnpkg.com/hardhat-dependency-compiler/-/hardhat-dependency-compiler-1.1.3.tgz#1e49e23f68878bd713f860c66648a711bc4a4a79" + integrity sha512-bCDqsOxGST6WkbMvj4lPchYWidNSSBm5CFnkyAex1T11cGmr9otZTGl81W6f9pmrtBXbKCvr3OSuNJ6Q394sAw== + +hardhat-deploy@^0.11.23: + version "0.11.24" + resolved "https://registry.yarnpkg.com/hardhat-deploy/-/hardhat-deploy-0.11.24.tgz#6865ede4544d2c53333695cb279aebec5322a262" + integrity sha512-26TXDlvW9ADIhb3OjAhjFgURcdU7jVeXpvm+4pJZ8dS0A7K+JFBskTdn9uA8h/vg8R3NUbPxRNPIbvyL1QRwtw== + dependencies: + "@types/qs" "^6.9.7" + axios "^0.21.1" + chalk "^4.1.2" + chokidar "^3.5.2" + debug "^4.3.2" + enquirer "^2.3.6" + ethers "^5.5.3" + form-data "^4.0.0" + fs-extra "^10.0.0" + match-all "^1.2.6" + murmur-128 "^0.2.1" + qs "^6.9.4" + zksync-web3 "^0.8.1" + hardhat-gas-reporter@^1.0.9: version "1.0.9" resolved "https://registry.yarnpkg.com/hardhat-gas-reporter/-/hardhat-gas-reporter-1.0.9.tgz#9a2afb354bc3b6346aab55b1c02ca556d0e16450" @@ -2758,6 +2923,11 @@ immutable@^4.0.0-rc.12: resolved "https://registry.yarnpkg.com/immutable/-/immutable-4.2.4.tgz#83260d50889526b4b531a5e293709a77f7c55a2a" integrity sha512-WDxL3Hheb1JkRN3sQkyujNlL/xRjAo3rJtaU5xeufUauG66JdMr32bLj4gF+vWl84DIA3Zxw7tiAjneYzRRw+w== +imul@^1.0.0: + version "1.0.1" + resolved "https://registry.yarnpkg.com/imul/-/imul-1.0.1.tgz#9d5867161e8b3de96c2c38d5dc7cb102f35e2ac9" + integrity sha512-WFAgfwPLAjU66EKt6vRdTlKj4nAgIDQzh29JonLa4Bqtl6D8JrIMvWjCnx7xEjVNmP3U0fM5o8ZObk7d0f62bA== + indent-string@^4.0.0: version "4.0.0" resolved "https://registry.yarnpkg.com/indent-string/-/indent-string-4.0.0.tgz#624f8f4497d619b2d9768531d58f4122854d7251" @@ -3213,6 +3383,11 @@ markdown-table@^1.1.3: resolved "https://registry.yarnpkg.com/markdown-table/-/markdown-table-1.1.3.tgz#9fcb69bcfdb8717bfd0398c6ec2d93036ef8de60" integrity sha512-1RUZVgQlpJSPWYbFSpmudq5nHY1doEIv89gBtF0s4gW1GF2XorxcA/70M5vq7rLv0a6mhOUccRsqkwhwLCIQ2Q== +match-all@^1.2.6: + version "1.2.6" + resolved "https://registry.yarnpkg.com/match-all/-/match-all-1.2.6.tgz#66d276ad6b49655551e63d3a6ee53e8be0566f8d" + integrity sha512-0EESkXiTkWzrQQntBu2uzKvLu6vVkUGz40nGPbSZuegcfE5UuSzNjLaIu76zJWuaT/2I3Z/8M06OlUOZLGwLlQ== + mcl-wasm@^0.7.1: version "0.7.9" resolved "https://registry.yarnpkg.com/mcl-wasm/-/mcl-wasm-0.7.9.tgz#c1588ce90042a8700c3b60e40efb339fc07ab87f" @@ -3358,7 +3533,7 @@ mocha@7.1.2: yargs-parser "13.1.2" yargs-unparser "1.6.0" -mocha@^10.0.0: +mocha@^10.0.0, mocha@^10.2.0: version "10.2.0" resolved "https://registry.yarnpkg.com/mocha/-/mocha-10.2.0.tgz#1fd4a7c32ba5ac372e03a17eef435bd00e5c68b8" integrity sha512-IDY7fl/BecMwFHzoqF2sg/SHHANeBoMMXFlS9r0OXKDssYE1M5O43wUY/9BVPeIvfH2zmEbBfseqN9gBQZzXkg== @@ -3435,6 +3610,15 @@ ms@2.1.3, ms@^2.1.1: resolved "https://registry.yarnpkg.com/ms/-/ms-2.1.3.tgz#574c8138ce1d2b5861f0b44579dbadd60c6615b2" integrity sha512-6FlzubTLZG3J2a/NVCAleEhjzq5oxgHyaCU9yYXvcLsvoVaHJq/s5xXI6/XXP6tz7R9xAOtHnSO/tXtF3WRTlA== +murmur-128@^0.2.1: + version "0.2.1" + resolved "https://registry.yarnpkg.com/murmur-128/-/murmur-128-0.2.1.tgz#a9f6568781d2350ecb1bf80c14968cadbeaa4b4d" + integrity sha512-WseEgiRkI6aMFBbj8Cg9yBj/y+OdipwVC7zUo3W2W1JAJITwouUOtpqsmGSg67EQmwwSyod7hsVsWY5LsrfQVg== + dependencies: + encode-utf8 "^1.0.2" + fmix "^0.1.0" + imul "^1.0.0" + nanoid@3.3.3: version "3.3.3" resolved "https://registry.yarnpkg.com/nanoid/-/nanoid-3.3.3.tgz#fd8e8b7aa761fe807dba2d1b98fb7241bb724a25" @@ -3731,6 +3915,15 @@ promise@^8.0.0: dependencies: asap "~2.0.6" +proper-lockfile@^4.1.1: + version "4.1.2" + resolved "https://registry.yarnpkg.com/proper-lockfile/-/proper-lockfile-4.1.2.tgz#c8b9de2af6b2f1601067f98e01ac66baa223141f" + integrity sha512-TjNPblN4BwAWMXU8s9AEz4JmQxnD1NNL7bNOY/AKUzyamc379FWASUhc/K1pL2noVb+XmZKLL68cjzLsiOAMaA== + dependencies: + graceful-fs "^4.2.4" + retry "^0.12.0" + signal-exit "^3.0.2" + psl@^1.1.28: version "1.9.0" resolved "https://registry.yarnpkg.com/psl/-/psl-1.9.0.tgz#d0df2a137f00794565fcaf3b2c00cd09f8d5a5a7" @@ -3741,7 +3934,7 @@ punycode@^2.1.0, punycode@^2.1.1: resolved "https://registry.yarnpkg.com/punycode/-/punycode-2.3.0.tgz#f67fa67c94da8f4d0cfff981aee4118064199b8f" integrity sha512-rRV+zQD8tVFys26lAGR9WUuS4iUAngJScM+ZRSKtvl5tKeZ2t5bvdNFdNHBW9FWR4guGHlgmsZ1G7BSm2wTbuA== -qs@^6.4.0, qs@^6.7.0: +qs@^6.4.0, qs@^6.7.0, qs@^6.9.4: version "6.11.0" resolved "https://registry.yarnpkg.com/qs/-/qs-6.11.0.tgz#fd0d963446f7a65e1367e01abd85429453f0c37a" integrity sha512-MvjoMCJwEarSbUYk5O+nmoSzSutSsTwF85zcHPQ9OrlFoZOYIjaqBAJIqIXjptyD5vThxGq52Xu/MaJzRkIk4Q== @@ -3936,6 +4129,11 @@ resolve@^1.1.6: path-parse "^1.0.7" supports-preserve-symlinks-flag "^1.0.0" +retry@^0.12.0: + version "0.12.0" + resolved "https://registry.yarnpkg.com/retry/-/retry-0.12.0.tgz#1b42a6266a21f07421d1b0b54b7dc167b01c013b" + integrity sha512-9LkiTwjUh6rT555DtE9rTX+BKByPfrMzEAtnlEtdEwr3Nkffwiihqe2bWADg+OQRjt9gl6ICdmB/ZFDCGAtSow== + reusify@^1.0.4: version "1.0.4" resolved "https://registry.yarnpkg.com/reusify/-/reusify-1.0.4.tgz#90da382b1e126efc02146e90845a88db12925d76" @@ -4006,6 +4204,20 @@ safe-regex-test@^1.0.0: resolved "https://registry.yarnpkg.com/safer-buffer/-/safer-buffer-2.1.2.tgz#44fa161b0187b9549dd84bb91802f9bd8385cd6a" integrity sha512-YZo3K82SD7Riyi0E1EQPojLz7kpepnSQI9IyPbHHg1XXXevb5dJI7tpyN2ADxGcQbHG7vcyRHk0cbwqcQriUtg== +"sandbox-smart-contracts-0.0.30@git+https://github.com/thesandboxgame/sandbox-smart-contracts.git#release_0.0.30": + version "0.0.1" + resolved "git+https://github.com/thesandboxgame/sandbox-smart-contracts.git#05ad926ee6381c24add7dc55dc6866eff877f0be" + dependencies: + "@maticnetwork/fx-portal" "^1.0.5" + "@openzeppelin/contracts" "^3.2.1-solc-0.7" + "@openzeppelin/contracts-0.6" "npm:@openzeppelin/contracts@3.2.0" + "@openzeppelin/contracts-0.8" "npm:@openzeppelin/contracts@4.4.2" + "@openzeppelin/contracts-0.8.13" "npm:@openzeppelin/contracts@4.8.0" + "@openzeppelin/contracts-upgradeable" "4.4.2" + "@openzeppelin/contracts-upgradeable-0.8.13" "npm:@openzeppelin/contracts-upgradeable@4.8.0" + "@openzeppelin/hardhat-upgrades" "^1.4.3" + fx-portal "^1.0.3" + sc-istanbul@^0.4.5: version "0.4.6" resolved "https://registry.yarnpkg.com/sc-istanbul/-/sc-istanbul-0.4.6.tgz#cf6784355ff2076f92d70d59047d71c13703e839" @@ -4135,6 +4347,11 @@ side-channel@^1.0.4: get-intrinsic "^1.0.2" object-inspect "^1.9.0" +signal-exit@^3.0.2: + version "3.0.7" + resolved "https://registry.yarnpkg.com/signal-exit/-/signal-exit-3.0.7.tgz#a9a1767f8af84155114eaabd73f99273c8f59ad9" + integrity sha512-wnD2ZE+l+SPC/uoS0vXeE9L1+0wuaMqKlfz9AMUo38JsyLSBWSFcHR1Rri62LZc12vLr1gb3jl7iwQhgwpAbGQ== + slash@^3.0.0: version "3.0.0" resolved "https://registry.yarnpkg.com/slash/-/slash-3.0.0.tgz#6539be870c165adbd5240220dbe361f1bc4d4634" @@ -4164,6 +4381,11 @@ solc@0.7.3: semver "^5.5.0" tmp "0.0.33" +solidity-ast@^0.4.15: + version "0.4.46" + resolved "https://registry.yarnpkg.com/solidity-ast/-/solidity-ast-0.4.46.tgz#d0745172dced937741d07464043564e35b147c59" + integrity sha512-MlPZQfPhjWXqh7YxWcBGDXaPZIfMYCOHYoLEhGDWulNwEPIQQZuB7mA9eP17CU0jY/bGR4avCEUVVpvHtT2gbA== + solidity-coverage@^0.8.2: version "0.8.2" resolved "https://registry.yarnpkg.com/solidity-coverage/-/solidity-coverage-0.8.2.tgz#bc39604ab7ce0a3fa7767b126b44191830c07813" @@ -4593,7 +4815,7 @@ typedarray@^0.0.6: resolved "https://registry.yarnpkg.com/typedarray/-/typedarray-0.0.6.tgz#867ac74e3864187b1d3d47d996a78ec5c8830777" integrity sha512-/aCDEGatGvZ2BIk+HmLf4ifCJFwvKFNb9/JeZPMulfgFracn9QFcAf5GO8B/mweUjSoblS5In0cWhqpfs/5PQA== -typescript@^4.9.5: +typescript@^4.0.5, typescript@^4.9.5: version "4.9.5" resolved "https://registry.yarnpkg.com/typescript/-/typescript-4.9.5.tgz#095979f9bcc0d09da324d58d03ce8f8374cbe65a" integrity sha512-1FXk9E2Hm+QzZQ7z+McJiHL4NW1F2EzMu9Nq9i3zAaGqibafqYwCVU6WyWAuyQRRzOlxou8xZSyXLEN8oKj24g== @@ -4758,6 +4980,11 @@ wide-align@1.1.3: dependencies: string-width "^1.0.2 || 2" +wonka@^6.1.2: + version "6.2.3" + resolved "https://registry.yarnpkg.com/wonka/-/wonka-6.2.3.tgz#88f7852a23a3d53bca7411c70d66e9ce8f93a366" + integrity sha512-EFOYiqDeYLXSzGYt2X3aVe9Hq1XJG+Hz/HjTRRT4dZE9q95khHl5+7pzUSXI19dbMO1/2UMrTf7JT7/7JrSQSQ== + word-wrap@~1.2.3: version "1.2.3" resolved "https://registry.yarnpkg.com/word-wrap/-/word-wrap-1.2.3.tgz#610636f6b1f703891bd34771ccb17fb93b47079c" @@ -4914,3 +5141,8 @@ yocto-queue@^0.1.0: version "0.1.0" resolved "https://registry.yarnpkg.com/yocto-queue/-/yocto-queue-0.1.0.tgz#0294eb3dee05028d31ee1a5fa2c556a6aaf10a1b" integrity sha512-rVksvsnNCdJ/ohGc6xgPwyN8eheCxsiLM8mxuE/t/mOVqJewPuO1miLpTHQiRgTKCLexL4MeAFVagts7HmNZ2Q== + +zksync-web3@^0.8.1: + version "0.8.1" + resolved "https://registry.yarnpkg.com/zksync-web3/-/zksync-web3-0.8.1.tgz#db289d8f6caf61f4d5ddc471fa3448d93208dc14" + integrity sha512-1A4aHPQ3MyuGjpv5X/8pVEN+MdZqMjfVmiweQSRjOlklXYu65wT9BGEOtCmMs5d3gIvLp4ssfTeuR5OCKOD2kw==